How to read the sheet name dynamic.
suppose I have excel1, excel2, excel3 so on and I have sheet name in excel1 is Data, in excel2 is Year and in excel3 is Setting. So how to read it dynamically. Plz guide
You can read sheets based on position also.
For Excel Application Scope activity, create one workbook variable and say ‘wb’ and then to read sheets like this:
First sheet - wb.getsheet(0)
Second sheet - wb.getsheet(1)
Etc…
1 Like
Bro I want to read and write the same sheet name.
Like in excel1 I have sheet name Data so same Data sheet name I want to writ in the final output excel with containing excel1 data in Data sheet.
Hello @balkishan,
Hope this simple example could help you 108133.zip (1.9 KB)
, as @lakshman suggested , you can use workbook.getSheet to retrieve the sheet name of each file.
Thanks and best regards,
Susana
3 Likes