Read a sheet tab without specifying its name

Hey everyone, is there a way to read a spreadsheet without specifying its name? The spreadsheet I’m going to use contains only one sheet called “Sheet1”, but I don’t want to specify this name, because sometimes this sheet comes with different names.


Hi @Bones

You can do so by using for each sheet activity or get workbook sheets activity to fetch the sheet first and then pass that value in read range.

Have a look at below post, it has various suggestions on same.

Hope this helps.

Hi,

If you want to achieve it using ReadRangeWorkbook activity, the following will help you.

Regards,

@Bones

With workbook activities you have to specify

else shift to excel activities then you can get the sheetname and use it dynamically

cheers

Hi @Bones

You can do it like below
workbook =new ClosedXML.Excel.XLWorkbook(“test.xlsx”)
sheets = workbook.Worksheets.Select(Function(s) s.Name).ToArray

Use loop to iterate through sheets and read it and you are done.


The image displays a table listing variables with their types and scopes within a programming context. (Captioned by AI)

1 Like

Obrigado a todos que me responderam, consegui solucionar este problema

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