Read range Excel sheet index

Hi,

I would like to use the readrange activity to read range from an excel file.

image

Is there any way to refer to the index of the sheet instead of the name of the sheet?
I have to read range from the first sheet of the excel file, but the name of the sheet always refers to the user’s name, so that is always different.

Could you please help me?

1 Like

Hello there,

Yes you can.

  1. Use excel application scope activity ,
  2. create output variable from the property called workbook(eg:wb)
  3. To see the sheet name just use write line and pass like this wb.GetSheets(0).
  4. Then use Read range and in the sheet pass like this wb.GetSheets(0).

PS: make sure to use that outside the excel scope(means you need to add one more excel scope and use read range there)

8 Likes

Well my friend, @ddpadil
As you said “excell application scope” can be used to do the given task.

But then you didnt tell her about other case where, if you dont have microsoft excell office,
you cant get access to any spreadsheet files.

So process would be:-1:

  • create flowchart/sequence
  • read range (give you file path along with the file extension and sheetnumber
  • give out the range in the range field such as “A1-A8” remeber the double quotes
  • store the range in the variable where each cell value will be stored.
  • later you can run any loop for the running of the desired output.
2 Likes