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

Free Support Forum - aspose.com

Get list of sheets from excel workbook

I am trying to find all the sheets from excel workbook, but i am not getting any function to get whole list of sheets from excel workbook.


Please use Workbook.Worksheets property to get all worksheets.
See API:


Moreover, there is no single API to get whole list of worksheets in the workbook, so you may get one by one to store to arrays/list. I guess you are using Aspose.Cells for Python via Java, here is sample code segment for your reference:
Sample code:

wb = Workbook("yourfile.xlsx")
ws = wb.getWorksheets()
sheet_count = ws.getCount()
# sheet name list
sheet_names = []
for i in range(0, sheet_count):
    sheet_name = ws.get(i).getName()

Hope, this helps a bit.

Please try the following codes to get all worksheets:
workbook = Workbook(“output.ods”)
sheets = workbook.getWorksheets()
for sheet in sheets: