Determining number of sheets in a workbook


Does anyone know how to determine how many sheets are in an xls document?

In the excel gui, you can see the number of sheets in the content tab under properties. I’ve tried looking through the buildinproperties function of aspose cells but cannot find it. I am new to Aspose.Cells and am using c#.

Is there a built in function for this?



Thanks for considering Aspose.

Well, you may use Worksheets.Count property to get the number of of sheets a workbook holds.


Workbook workbook =new Workbook();
Worksheets worksheets = workbook.Worksheets;
int totalsheets = worksheets.Count ;
Since you are new to Aspose.Cells, we appreciate if you could check our Wiki documentation to know more about the component features and their implementation using its APIs:
Thank you.