1

I'm trying to figure out a way to search in a google sheet.

Following is what I'm trying to accomplish as a beginner.

  1. I have a google sheet with these 3 columns and 1 record for sample

FileName || Sheet Link || Test Document

ABC 1.1 || http://SheetLink || Yes

  1. Automate navigate to the SheetLink in the 2nd column of the record.
  2. In the Sheet after navigating to the SheetLink search for "Test Document" provided in the sample above.
  3. If "Test Document" is found update the previous google csv column as Yes else no.

Following is what I tried on the studio:

  • On click on the RUN by the user, I navigated to this sheet using the GSuite's "Google Application suite".
  • Then use Read Range gave the spreadsheet ID.
  • Then used read row and read column. My problem is I'm unable to get the output from read row and read column to store in a variable.

Am I going the right direction? Reference would be great too.

enter image description here

MnZ
  • 207
  • 3
  • 17

1 Answers1

2

Hello regarding your question:

  1. If you select Read Row activity or Read Column activity on the right side of your UiPath studio you will see Properties pane as per below. In the Output section place the name of the variable to save your output data. Pressing Ctrl+K and placing the name, will automatically create a new variable with the appropriate type, for your convenience. enter image description here
  2. Now because the output from Read Row and Read Column activities is a Variable Type of Object[] you will need a simple For Each Activity to write-out your data. In the following example i named the output variable of Read Row activity as 'ReadRowOutput' and inside For Each loop a Message Box to output the content.

enter image description here

  1. Now in case you want to write out the contents of Read Range activity (one row at a time) the output Variable Type of the activity is DataTable and in this case you need to use For Each Row activity to run through content as per below.In the following example i named the output variable of Read Row activity as 'spreadSheetOutput' and inside For Each loop a Message Box to output the content.

enter image description here

Hope these information will help you.

Community
  • 1
  • 1
  • Great guide - just wondering if searching via .NET using the `Find` method on a `DataRowCollection`would be more efficient? But then again, using a `For Each Row` keeps the workflow more readable. https://learn.microsoft.com/en-us/dotnet/api/system.data.datarowcollection.find?view=netframework-4.7.2 – Wolfgang Radl Mar 22 '19 at 18:13