Is it possible to get the list worksheets name (or index) from an excel file?

Dear Sir


Is it possible to get the list worksheets name (or index) from an excel file?

Thanks for your support

Churchill

Hi,


Please see the following sample code for your reference:
e.g
Sample code:


Workbook workbook = new Workbook(“e:\test2\Book1.xlsx”);

for (int i = 0; i < workbook.Worksheets.Count; i++)
{
Console.WriteLine(workbook.Worksheets[i].Name);
}


Hope, it helps a bit.

Thank you.

Thank you very much!

You are most welcome. Please feel free to write back in case you need our further assistance with Aspose APIs.