When using background colors in cells within a pivot table, the converted pdf output displays wrong background coloring. Tested with aspose-cells 23.7 for Java using code snippet
PdfSaveOptions saveOptions = new PdfSaveOptions();
saveOptions.setCompliance(PdfCompliance.PDF_A_1_A);
Workbook workbook = new Workbook(inputStream);
workbook.calculateFormula();
workbook.save(outputStream, saveOptions);
Testdaten.zip (71,7 KB)
@mprischink
By using sample file and code for testing, we can reproduce the issue. Found that the background color of the pivot table was incorrect when saving the file to PDF.
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): CELLSJAVA-45573
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
@mprischink
We found the refreshed result is different in different machine.
Please refresh pivottable in Excel: Select PivotTable-> Pivotable Analyze(in toolbar)->Refresh, then share the snapshot here.
It does look different after the refresh, there are background colors, where there were none before, but it still doesn’t look like it does when opened with MS Excel
@mprischink,
Aspose.Cells should render the output PDF similar to what MS Excel renders to PDF after refreshing pivot table(s). If you still think the output of Aspose.Cells is different, please share a screenshot to highlight the problematic area(s) when comparing Excel display (after refreshing pivot tables) Vs output PDF by Aspose.Cells, we will check it soon.
Attached you’ll find the refreshed xlsx file, the render output of MS Excel, the render output of Aspose Cells and a direct comparison screenshot highlighting the areas, where background color is missing or was erroneously added by aspose when compared to the Excel render.
Testdaten - refreshed.zip (662,4 KB)
@mprischink,
Thanks for the sample files and screenshot in the zipped archive.
We have logged it with the existing ticket “CELLSJAVA-45573” into our database. We will evaluate it but you have provided us output PDF by MS Excel but not after refreshing PivotTable in MS Excel (manually). I have opened your Excel file and manually clicked Refresh pivot table option (Select PivotTable-> PivotTable Analyze(in toolbar)->Refresh) and then Save to PDF. The output PDF (attached) is almost same/identical to what Aspose.Cells renders.
Export_PDF_Testdaten_after_using_PivotTable_Refresh_in_MS_Excel.pdf (112.5 KB)
I cannot confirm that behaviour with Excel 2016 and Microsoft 365 Excel Versions. After selecting any cell of the pivot table and manually clicking “refresh” and/or “refresh all” there is no change in Appearance (besides minor column width adjustments) within Excel and after PDF Export.
We only get the background colors like those in your PDF when using Aspose PDF Transformation.
@mprischink,
This is the file we manually refreshed the pivot table using MS-Excel 2016 and saved it. Please refer to the attachment (16.6 KB). Please refresh the pivot table of your original file in MS-Excel and save it as xlsx and PDF files, and then upload the saved Excel and PDF files here. We will check it soon.
Those files where already submitted in the zip file of #6, but again here a gif, showing the refresh and export with no obvious effect on the background colours of the file:
2023-08-22_13h05_16.gif (43 Bytes)
And here the resulting refreshed files, again:
Testdaten - Copy.zip (404,6 KB)
@mprischink,
Your screenshot “2023-08-22_13h05_16.gif” does show nothing. So, you need to capture the screenshot again and provide us.
It looks like refreshed results are different on different machines. Anyways, please open “Testdaten - refreshed_out.xlsx” shared by @John.He in his post and let us know how it is shown in MS Excel on your end?
Uploading a gif (of that size at least) seems to be broken, zipping seems to work:
pivot_refresh_export.zip (6,2 MB)
The file @John.He provided looks as follows on my end:
Testdaten - refreshed_out.PNG (22,1 KB)
But this behaviour of Excel on your end is - besides the localization issues - certainly not wanted and not to be expected from our point of view. There should be no reason for Excel to change the background colors of individual cells when refreshing the pivot table. The behaviour of Excel on our end on the other hand is the expected - from our point of view - correct behaviour and that should also be reflected by the Aspose transformation.
@mprischink,
Thanks for the sample image files.
This is MS Excel’s behavior which is not consistent across different machines. Anyways, we have logged your files, details and concerns against your issue “CELLSJAVA-45573” into our database. We will evaluate and investigate it in details.
@mprischink,
Would you like to provide your machine environment? Including regional information and language information. This will be very helpful for us to locate the issue. Thank you.
Windows 10 Enterprise LTSC Version 1809, 64-Bit
MS Office Standard 2016, MS Excel 2016 (16.0.5408.1001) MSO (16.0.5404.1000) 32-Bit
Windows Language & Region settings: German (Austria)
Excel Language settings: German (Austria)
Let me know if you need further information.
@mprischink,
Thanks for providing us environment details and other info.
We will evaluate and get back to you.
@mprischink
Please check the attached 23.8.4.zip (39.9 KB) which is generated by internal hot fix 23.8.4.
@simon.zhao looks great! Will you be able to release the fix with 23.9?
@mprischink,
Thanks for your feedback.
Yes, we will include the fix into our next official release Aspose.Cells for .NET v23.9, which is due in the second week of September 2023. You will notified once the new version is published.
@amjad.sahi i hope there is also a release for Java planned around the same time?