Activity to check whether the sheet is present google spreadsheet

Hi Team,

I need to check whether the sheet is present in google sheet.
Please let me know which activity to be used to check whether the sheet exists.

Regards.

Hi @sowjanya.s

Check the below thread.

Regards

@sowjanya.s
GSuite Application Scope
JSONPath: “path/to/credentials.json”
Scopes: “https://www.googleapis.com/auth/spreadsheets.readonly

Try Catch
    Try
        Read Range
            SpreadsheetId: "your_spreadsheet_id"
            SheetName: "SheetNameToCheck"
            Range: "A1:A1"
            Output: dt (DataTable)
    Catch
        Exception: System.Exception
        Sequence
            // Handle the exception (Sheet does not exist)
            Log Message
                Level: Error
                Message: "Sheet does not exist."

@sowjanya.s,

  1. Create an array of string variable.
  2. Use For Each Sheet in Spreadsheet.
  3. Add currenSheet name to array of the string variable.

This will give you all sheet names available in the spreadsheet. You can add further logic as per your requirement.

Thanks,
Ashok :slight_smile:

Hi @sowjanya.s

Please check the below image:

Regards

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.