I am using Aspose.Cells for .Net version 7.2.1.0 and am trying to set the number format for the data values section of a pivot table. However, when I open the Excel file everything is in the right place, but the data in the column on the pivot table has the General number format and does not have the custom number format.
Hi Robert,
Thank you for using Aspose products.
Please give a try to our latest fix version of Aspose.Cells for .NET 7.6.0.7 as it should fix the problem. In case the issue persists, please share your complete source code, most preferably a runnable sample application along with your template file (if any). We need these details to properly analyze the issue on our end.
Thank you. I tried the new version that you recommended, but it didn’t fix the problem.
Hi Robert,
First of all, please accept my apology for a bit delayed response.
I have evaluated your present scenario on my end while using the latest version of Aspose.Cells for .NET 7.6.1.0. I can confirm that if the NumberFormat is set for the PivotField and then same PivotField is added to the DataField collection, the NumberFormat settings are lost. Whereas, if the NumberFormat settings are applied to the PivotField previously added to the DataField collection then these settings are preserved, and therefore rendered correctly in the resultant file. A ticket has been logged in this reference so we could properly analyze the problem cause on our end before we could provide a fix for it. The ticket Id for your future reference is CELLSNET-42155.
- You are correct, if some property is set for an object and then the object is added to a collection, the settings should remain intact even in the collection. I have logged your comments to the ticket referenced above.
- If you are getting the Evaluation watermark with the latest assembly, this means your subscription has expired therefore you will not be able to use the latest releases (including the one providing the fix for said issue) in licensed mode without renewing your subscription.
Please feel free to write back in case you have more questions.
Hi,