Issue with Subtotal

Hi There,

We are using Aspose Cells create our excel report. We are facing the issue while creating the report with subtotal option. Here with I have attached the sample file & code we have used.

In the attached file you can able to see the Organization and Customer fields. If the organization or customer having more than one record its working fine. Suppose, if the organization or customer having only one records in that case Aspose add the corresponding organization or customer details to the next organization or customer totals.

But, its working if we are create the subtotal using office Excel

Below code we have used in our development.

Aspose.Cells.License Cellslicense = new Aspose.Cells.License();
Aspose.Cells.Workbook asposeWorkBook = new Aspose.Cells.Workbook();
Aspose.Cells.Worksheet asposeWorkSheet = null;
asposeWorkBook.Open(“F:\AsposeSample\Sample.xlsx”);
asposeWorkSheet = asposeWorkBook.Worksheets[0];


int[] totalList = new int[6] { 9, 10, 11, 12,13,14 };
Aspose.Cells.CellArea ca = new Aspose.Cells.CellArea();
Aspose.Cells.Cells cells = asposeWorkSheet.Cells;
ca.StartRow = 1;
ca.StartColumn = 0;
ca.EndRow = cells.MaxDataRow;
ca.EndColumn = cells.MaxColumn;
asposeWorkSheet.Cells.Subtotal(ca, 0, Aspose.Cells.ConsolidationFunction.Sum, totalList, true, false, true);

int[] subtotalList = new int[6] { 9, 10, 11, 12, 13, 14 };
ca.StartRow = 1;
ca.StartColumn = 0;
ca.EndRow = cells.MaxDataRow;
ca.EndColumn = cells.MaxColumn;
asposeWorkSheet.Cells.Subtotal(ca, 5, Aspose.Cells.ConsolidationFunction.Sum, subtotalList, false, false, true);

asposeWorkBook.Save(@“F:\AsposeSample\Sample1.xlsx”);

Hi,

I have found the issue (after an initial test) using your sample code with your template file. We will figure it out soon.

I have logged your issue into our issue tracking system with an issue id: CELLSNET-18004. Once it is resolved, we will notify you.

Thank you.

Hi,

Please try the attached version v5.0.0.4, we have fixed your
issue.

Thank you.

The issues you have found earlier (filed as 18004) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.