Free Support Forum -

List command in Aspose.Cells for .Net

Are you supporting the list command like it is shown in ?


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.