How to get sheet in Excel from its name in string?

I have an array of string like the following:
arraySheets = new string(){“7-3-2019”, “7-2-2019”, “7-1-2019”}

This array of string contains the sheet names in string format. Now, I need to append all data into one new Excel workbook. I am using Excel Application Scope to work on this Excel workbook, but I am not sure how I can get the actual sheet from its sheet name in string.

@tomato25

How about use below logic?
I think you have both Excel file name and sheet name, so it easily to handle the file and sheet.

  1. Excel application scope
  2. for each string Array.
  3. Read range activity with array item at 2 (or you can do what you want)
  4. end for.
1 Like

Hi @tomato25

Use Excel application scope and in property there is workbook create a work book as wb

Use for each item in wb.getSheets

Print item.toString
Use read range and pass item

Thanks
Ashwin.S

1 Like
  • For each
    extract item , excel application scope - write range or append range
1 Like

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