About EasyMorph Tutorials & Examples Web-help

Check sheet name in Google Sheets

Hello,

There a way to check if exists a sheet name in a Google Sheets file ? I try to use this information into next loading operation.

Best regards,
Radu.

Hello Radu,

For now, the simplest way to check if a sheet exists in a Google Sheets file is as follows:

  • Move your “Import Google Sheets” action to a submodule
  • Call that submodule with the “Call another module or project” action in the “Capture errors and continue” mode. In case of successful import, it will return an empty dataset. In case of an import error, it will return a dataset with that error.
  • Use the conditional workflow to handle both successful and unsuccessful cases:
    – Use “Derive table” with the “If source table is empty” mode to handle the successful case and import sheet with that name one more time
    – Use “Derive table” with the “If source table is NOT empty” mode to handle the unsuccessful case and try to import sheet with some other name

Also, you can check several sheet names using the “Iterate” action and passing sheet names to the subproject as a parameter.

If you will have difficulties implementing this approach, please let me know - I’ll make an example project for you. But in order to do that, I will need a better understanding of your actual case.

To learn more about EasyMorph visit easymorph.com.