I’m trying to use the LookUp function and write a range from an Excel workbook however the sheet name will not always be the same. How can I write a range without knowing the sheet name?
Hi @scott.luntz,
Before write range, u can use https://docs.uipath.com/activities/lang-en/docs/excel-get-workbook-sheets to get sheet names.
sheetNames.xaml (5.2 KB)
Thanks!
Thank you. However this only returns one sheet name where I have multiple sheet names. I’m trying to select a string across all of the sheets. Please help.
Thank you so much! Is there a way I can then select the correct sheet name according to what is displayed?
Hi @scott.luntz
For retrieving multiple sheets names from excel you can use get workbook sheets Activity
Which will retrieve the array of all sheet names
Mark as solution and like it if this helps you
Happy Automation
Best Regards
Er Pratik Wavhal
Thank you. How can I then select the correct sheet name and read from it?
Hi @scott.luntz
So as per the List suppose your output variable is sheetName
So use it as below
sheetName(0).ToString
Like wise by changing the index you will get all the sheet names
Mark as solution and like it if this helps you
Happy Automation
Best Regards
Er Pratik Wavhal