Create XLS file with Pivot Table

Hi again,


I have logged a ticket CELLSNET-42556 in our bug tracking system, and requested the development team to share their valuable feedback on this scenario. Please spare us little time for proper analysis of the problem cause. We post here as soon as some new comes in.

@calistasoft,

Please try our latest version/fix: Aspose.Cells for .NET v20.3.2 (attached)

Your issue should be fixed in it. You can use the following code to get expected results.
e.g
Sample code;

.NET:
            var book = new Aspose.Cells.Workbook(filePath + "Loss_Ratio_2014-04-12.xls");
            var sheet = book.Worksheets[0];
            var pivot = sheet.PivotTables[0];

            PivotFieldCollection pivotFields = pivot.BaseFields;

            PivotField pivotField = pivotFields["Branch"];

            //Setting the field auto sort
            pivotField.IsAutoSort = true;

            //Setting the field sorting in ascending order
            pivotField.IsAscendSort = true;

            //Sort PivotField named "Branch" via DataField named "GPW"
            pivotField.AutoSortField = 0;

            pivot.CalculateData();
            pivot.RefreshDataOnOpeningFile = true;

            book.Save(filePath + "out.xlsx");

Let us know your feedback.
Aspose.Cells20.3.2 For .Net2_AuthenticodeSigned.Zip (5.3 MB)
Aspose.Cells20.3.2 For .Net4.0.Zip (5.3 MB)

The issues you have found earlier (filed as CELLSNET-42556) have been fixed in Aspose.Cells for .NET v20.4. This message was posted using Bugs notification tool by Amjad_Sahi