I am trying to extract a chart from excel and save it as an image without changing any styles, but there is some formatting differences in the date field and at the bottom of the chart. Is this a bug in apose.cells?
Thanks for the template Excel file and screenshot.
After initial testing, I was able to reproduce the issue as you mentioned by using your template file and sample. I found the chart in Excel doesn’t match the chart saved as an image by Aspose.Cells for Java.
We require thorough evaluation of the issue. 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-46172
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.
Hi @dfinsolutions
For this issue, our optimized result is as follows, which will take effect in version 24.12. It is expected to be released at the beginning of next month. 241119.png (2.7 KB)
@leoluo
Hello,
I am still able to reproduce the issue. Could you please take a look?
I’ve tried with both 24.12 and the latest 25.2 aspose cells versions.
Thanks for the template Excel file and screenshot.
After initial testing, I am able to reproduce the issue as you mentioned (via screenshot) by rendering the chart (in the template Excel file) to image. I found that category axis labels’ formatting is different when rendering chart to image.
We require thorough evaluation of the issue. 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-46276
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.
We carefully analyzed the new issue you raised. We found that the first file you shared is “chart.xlsx”, and the second file you shared is “chart3.xlsx”, these two files are different in Excel’s print preview, and the picture we output is based on the print preview. chart.xlsx.png (43.0 KB)
This is the current output of our test, which is consistent with the Excel print preview. Could you please check your Excel print preview again? thank you.
@leoluo The Excel file is slightly different. I increased the chart’s width by a small amount and was able to reproduce the same discrepancy between the excel chart and the chart saved as an image
Hi @dfinsolutions
Yes, your adjustments to the chart will affect the layout.
What I mean is that what is displayed on the Excel interface may not be the same what is displayed in the print preview.
This is a feature of Excel, especially when the pixel difference is very small.
You need to click on the menu “file-print” to see the actual situation after your adjustment, and our output image is consistent with the print preview.
@leoluo Thank you, that was helpful! I didn’t know the ‘file-print’ functionality was being used here.
I’ve tested a few different scenarios and found one where ‘file-print’ doesn’t match the image. Could this be a bug?
You are right, the output chart image generated by Aspose.Cells for Java does not match with the print preview (of the chart). The category axis labels’ formattings/placements are not matched with the print preview for the chart (in MS Excel). I have logged your resource files and details with your existing ticket “CELLSJAVA-46276” into our database. We will look into it soon.
Hi @dfinsolutions
Yes, we can reproduce the problem using your chart4.xlsx.
For this scenario, we are outputting images based on the Excel print preview.
Excel’s layout algorithm is not public, and we are trying to be consistent with it. When the width changes gradually at the pixel level, there may be inconsistent with Excel, and we apologize for that. Based on the file "chart4.xlsx"you provided, we will make corrections to this.
When “CELLSJAVA-46276” is resolved, we will notify you, thank you.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
Enables storage, such as cookies, related to analytics.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.