Hi,
Our test engineer has found a bug that Excel shows a warning message upon openning after we copy pivot style from one xls workbook to the target workbook.
The code we used is :
try
{
targetPivot.CopyStyle(srcPivot);
}
catch (Exception)
{
targetPivot.PivotTableStyleName = srcPivot.PivotTableStyleName;
targetPivot.PivotTableStyleType = srcPivot.PivotTableStyleType;
}
The targetPivot is the pivot table (PivotTable10) in Quantity worksheet of the TargetWorking File.xls
The srcPivot is the pivot table (PivotTable10) in Quantity worksheet of the SourceWorking File.xls
Both files are attached.
The Aspose.Cells version we are using is 7.4.1.1.
The version of Excel we are using is 2010. A jpg file is attached for this issue.
Could you take a look at this problem and let us know if you guys can reproduce the issue and it is possible to be fixed, please?
Regards
Bill
Hi,
Thanks for your posting and using Aspose.Cells for .NET.
Please provide us your simple runnable code to replicate this issue at our end. We will check your issue soon and help you asap.
Hi Shakeel
Thanks for your reply!
I have composed the testing code as below:
string srcFile = @"SourceWorkingFiel.xlsx";
string tarFile = @"TargetWorkingFile.xlsx";
//Get the target workbook
Workbook targetworkbook, sourceworkbook;
targetworkbook = new Workbook(tarFile);
sourceworkbook = new Workbook(srcFile);
Worksheet targetsheet = targetworkbook.Worksheets["Quantity"];
Worksheet sourcesheet = sourceworkbook.Worksheets["Quantity"];
Aspose.Cells.Pivot.PivotTable sourcePivotTable = sourcesheet.PivotTables[0];
Aspose.Cells.Pivot.PivotTable tagetPivotTable = targetsheet.PivotTables[0];
tagetPivotTable.CopyStyle(sourcePivotTable);
targetworkbook.Save(tarFile + ".out.xls");
Please let me know if you can repro the issue with this code and please dont hesitate to let me know if you need anything else from our end.
Regards
Bill
Hi,
Thanks for your posting and using Aspose.Cells for .NET.
We were able to replicate this issue using your code with the latest version. We have logged this issue in our database. We will look into this issue and fix it.
Once, the issue is fixed or we have some other update for you, we will let you here.
This issue has been logged as CELLSNET-41471.
Hi,
Thanks for your posting and using Aspose.Cells for .NET.
We have fixed the issue.
Please download and try this fix: Aspose.Cells for .NET v7.4.1.3 and let us know your feedback.
Hi Shakeel
Thanks very much for resolving this issue for us! I confirm that this issue has been resolved nicely. Sorry for the late reply.
Regards
Bill
Hi,
Good to know that your issue is resolved by the new fix.
We have already closed your ticket now.
Feel free to contact us any time if you need further help or have some other issue, we will be happy to assist you soon.
Thank you.
The issues you have found earlier (filed as CELLSNET-41471) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by aspose.notifier.