Excel Sheet reading

Hello guys,

I have an read range activity which reads an excel

now i want to read excel irrespective of sheet name.

Can we code like that

We can use activity called GetWorkbookSheets in Excel package. Once we have the name of the sheet, we can attempt to use it in the “Read Range” activity.

Hi,

How about using ForEachExcelSheet activity as the following?

Regards,

1 Like

@Gokul_Murali

If the excel contains only one sheet then you can use Excel.SelectedSheet in the modern activity instead of giving sheetname

cheers

@Yoichi

Can we do this in read range workbook classic activity

Unfortunately, no. If you need to use Workbook-ReadRange the following sample will help you.

workbook = new ClosedXML.Excel.XLWorkbook("test.xlsx")

Then

sheets = workbook.Worksheets.Select(Function(s) s.Name).ToArray

Sample
Sample20230530-1aL.zip (8.5 KB)

Regards,