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

Free Support Forum - aspose.com

List command in Aspose.Cells for .Net

Are you supporting the list command like it is shown in http://office.microsoft.com/en-us/excel/HA010929681033.aspx?pid=CL100570551033 ?


Thanks for considering Aspose.

Yes, Aspose.Cells for .NET supports creating List Objects, kindly check the following APIs:



Sample Code:

Workbook workbook = new Workbook();
ListObjects listObjects = workbook.Worksheets[0].ListObjects;
listObjects.Add(0, 0,52, 10, true);
listObjects[0].ShowTotals = true;
listObjects[0].ListColumns[3].TotalsCalculation = Aspose.Cells.TotalsCalculation.Sum;

Thank you.

Thanks. It is working nicely now.

But ... I have a comment to make: When I first tried it, I received an exception when calling the save method of the workbook because I was providing an invalid endcolumn arguments (say in your example you provide 10 for this argument which means that you have 11 columns indexed from 0 to 10). I was providing 10 but i was really having 10 columns (indexed from 0 to 9).

The exception triggered was not really clear and it occurs only on when calling the Save. I wander if you could do something to handle differently.


Good to know that it works for you.

We will check if we could refine the related exception to make it more precise.

Thank you.