We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

How to iterate between worksheets in workbook?

I want to iterate between sheets of a workbook.

I am having a Excel file that contains 3 sheets.
I want to iterate into the excel file, by iterating through sheets.

For example.

My Excel file contains 3 sheets, namely Sheet1,sheet2,sheet3.
I want to iterate through these three sheets and collect there names in a collection.

How can I achieve this.
Excel file is already in a open mode.


See the sample code for your reference:
Aspose.Cells.Workbook workbook = new Workbook(“e:\test\Book1.xls”);
foreach (Worksheet ws in workbook.Worksheets)