We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Problems translating Excel charts to PDF

Hi again. It seems that when exporting my Excel spreadsheet to PDF, the chart axes are not rendering correctly. For one thing, it is changing the number ranges and also it doesn’t seem to be picking up the -90 degree rotation of the y axis label. See attached Excel and corresponding PDF file.

Hi,


I can find a few differences regarding charts when converting your Excel file to PDF format.

I have logged a ticket with an id: CELLSNET-40192. We will look into it soon.

Thank you.

Hi,

We have fixed this issue. Please download: Aspose.Cells for .NET v7.0.4.2

It’s still happening for me. The axis label is displaying fine now (it’s not rotated 90 degrees as before), but in the first chart (top left), the numbers along the axes are still different between Excel and PDF versions (Excel y axis range is -10 to 8 and PDF is -10 to 10 and Excel x axis range is -4 to 2 and PDF x axis range is -2.5 to 1.5) and in the 1st and 2nd chart (top center), the Excel x axis labels fit all on one line, whereas in the PDF version the labels spread out over 2 lines. Also, the title of the first chart in the PDF version seems to be moved over the y axis label, whereas in Excel it’s centered over the chart. Anyway, the Excel and PDF charts look quite a bit different still. Am reattaching the new Excel/PDF versions generated using the latest version of Aspose.Cells (7.0.4.3) for your review.

Hi,


Thanks for the template files.

After an initial test, I can see some differences as you pointed out. I have reopened your ticket again and we will soon look into your issue.

Thank you.

Upon completing development of the exhibit, I found another issue with translating Excel to PDF. I have attached both Excel and PDF files. Note the blue bar extending from the “Asset Class Allocation” chart in the PDF version. We are still currently evaluating the product and won’t be able to use it in our production environment until we can get a completely accurate export. About how long do you think until you can get all of these issues resolved? This is making me a little nervous. :slight_smile:

Hi,

Thanks for the files.

I can notice the issue trying our latest version/fix of the product as you pointed out. I have logged it too. We are looking into your issues. We will get back to you soon. If the issues take longer time, we will share an eta for it.

Thank you.
Hi,

Please try the new release (v7.1.0). We fixed the issues (off-limits).

Mostly looks good. Still having issues with horizontal axes for 2 of the charts however. Top middle chart (Asset Growth) axis breaks over on 2 lines in PDF version, whereas in Excel version it is all on1 line. I need to keep the axis from spanning multiple lines. Also bottom right chart (Long/Short Exposure) x axis in PDF is completely messed up. If you take a look at it I think it will be obvious. Everything else appears to be an accurate translation from Excel. I have attached samples again of Excel/PDF versions for your review. Still waiting on an acceptable fix so that I can demo this to internal users for final purchase decision.

Oh sorry. Noticed a couple more things. Top left chart (Manager vs. Market Returns) is also messed up (horizontal axis spanning multiple lines with some weird hypens in there) and the axis label (Benchmark %) appears to be getting cut off by the chart below it (probably due to the axis running over onto multiple lines). Anyway, could you please export my sample Excel file to PDF and verify it next time around before indicating that the problem is fixed? Most of the same issues seem to keep appearing with each fix.

Hi,


Actually we resolved the issue (off-limits) you mentioned in the post:
https://forum.aspose.com/t/119526

We are still working over other factors, and try to fix them. It might be difficult to mimic your template charts 100% as the charts are with minimized sizes. Anyways, we will check further and once we fix them, we will let you know here.

Also:
"Also bottom right chart (Long/Short Exposure) x axis in PDF is completely messed up. If you take a look at it I think it will be obvious"

This chart is fine, see the chart in the attachment PDF file that is converted with v7.0.4.8 from your template file.

Thank you.

Hi,

We have investigated the issue you mentioned. Currently we are not fully understand how Excel handles axis labels. It is too complex and we cannot find out a better solution now. If we could fulfill your requirements according to your templates, it will cause many more other problems in other Excel charts.

For details, please check the attachment. Now you may modify your template file by specifying the Minimum, Maximum and Major unit of axis to avoid the issues.

So I am setting the min/max/major units as you requested, but I am still getting strange behavior in the PDF output. Note the upper right chart. It is empty but displayed in the Excel version, but in the PDF version it is totally missing.

Hi,

Please download the latest version:
Aspose.Cells
for .NET v7.1.0.4



We created a test project and it displays the upper right chart in the generated pdf.

We will continue to look into the other issues, the area of the second chart(Layout[0]Chart[0].Emf) is not filled to the right of plot and the category labels are wrap in some charts

Well, that’s discouraging. Because I downloaded version 7.1.0.4, rebuilt my project, and I am still seeing an empty chart. Now I have no idea how to proceed, since you say that it works for you. The only thing I can think that is different is that I did not actually create the Excel spreadsheet first in my program. I went straight to PDF from the in-memory version of the spreadsheet that I created using Aspose.cells. Please advise.

Hi,

We can not reproduce the generated empty chart issues.

We take notice of the source data of empty chart is “=Chart3!#REF!”. The chart is unserviceable and it does not represent anything.

I didn’t notice that. That was the problem. Thank you!

It just worries me because I keep wondering what weird quirky issue I’m going to find next. And I’m worried we will find something that doesn’t have a work around and that you aren’t able to fix. Once we deploy this to our production environment we will have to start answering to end users. On the plus side however, your responsiveness so far has been excellent and your turn around for bug fixes very timely.

Hi,

Since, this is a new issue, so we have split your thread into a newer thread and added your issue in our database for a fix.

Please see the link below.
https://forum.aspose.com/t/117426

Hi. Just wanted to follow up on where you guys are at with fixing the axis wrapping issue with the charts. This still happens sometimes and it is difficult to design the charts around this. Other than this issue, mostly everything has been fixed.