Export to PDF chart different from Excel version

Hi,


Could you attach your XLSX file and output PDF file here, we will look into your issue soon.

Thank you.

Ok. Below is a code snippet from my application, pared down to almost the bare minimum. If you toggle the value of IsExcelOutput between true and false you will get the 2 different output files, Excel and PDF. Note the difference in the Excel and PDF versions of the Long/Short Exposure chart. I have attached a modified template file with some sample data that I created to demonstrate the problem.

//Create an instance of workbook from QuantSheet excel template
var xlt = new WorkbookDesigner();
var wb = new Workbook(Page.MapPath(“QuantSheetTemplate.xlsx”));

xlt.Workbook = wb;
xlt.Process();

if (IsExcelOutput)
{
//Output workbook to Excel using Aspose.Cells
wb.Save(Page.Response, “QuantSheet.xls”, ContentDisposition.Attachment, new XlsSaveOptions());
}
else
{
//evaluate worksheet formulas (otherwise they won’t be represented in the pdf output)
wb.CalculateFormula();
//make all sheets invisible except for the first worksheet
for (int i = 1; i < wb.Worksheets.Count; i++)
wb.Worksheets[i].IsVisible = false;
wb.Save(this.Response, “QuantSheet.pdf”, ContentDisposition.Attachment, new PdfSaveOptions());
}

Hi,

Thanks for your elaboration and providing us your source file and the source code to replicate this issue.

We will look into your issue and provide a fix soon.

Any update on this? This is holding up our product release date.

Hi,


I am sorry but we don’t have any update about the resolution of this issue from our development team. I have forwarded your concerns to our development team and, as soon as we get an update, will update you here.

I appreciate your patience for the resolution of the issue

Hi,

I have tested your issue with the latest version:
Aspose.Cells
for .NET v7.2.1.1
and I found that issue still exists.

I have tested this issue with the following code. I have attached the source xlsx file and the output pdf with this post.

Please also see the screenshot for explanation of this bug.

We have logged your comment in our database against the issue id: CELLSNET-40639

Hopefully, this bug will be fixed soon.

C#


string filePath = @“F:\QuantSheetTemplate.xlsx”;


Workbook workbook = new Workbook(filePath);


workbook.CalculateFormula();


workbook.Save(filePath + “.out.pdf”);


Screenshot:

Hi,

We have fixed the bug for area chart that has null values in the source data.

Please download and try the latest fix: Aspose.Cells for .NET v7.2.1.3

I am not seeing anything different in version 7.2.1.3. It is still doing the same thing. Did you verify the fix against my sample code with spreadsheet?

Actually, I managed to get it working. It seems the template file must end in xlsx instead of xls. Otherwise the fix doesn’t work. I don’t know if this is expected behavior or not, but it doesn’t seem right to me. But at least I got it working so I’m ok for now.

Hi,

Thanks for your feedback.

It’s good to know that part of your issue is now resolved.

We will look into your comment and fix the remaining issues.

Well it seems I spoke too soon. Changing the template extension from xls to xlsx fixed the original issue when exporting to PDF, but created other formatting issues, both in Excel and PDF. I tried to fix the Excel formatting issues by exporting the file as an xlsx file, however I got the following error message from Excel: “Excel cannot open the file ‘QuantSheet.xlsx’ because the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file.” I have attached sample Excel and PDF outputs so that you can see some of the issues. The PDF issues are mostly with the date axis values not appearing on the Rolling 36-Month Standard Deviation and Strategy Allocation charts. The Excel formatting issues are much more extreme. I have also attached versions of the old PDF/Excel outputs before I changed the template type to xlsx (the attachments have “Old” in the name). I am almost thinking of reverting back to the xls template without the fix for the area charts, as it seems the formatting issues are much more severe with using the xlsx template.

Hi,

Could you please provide me a Ms-Word docx file describing all of your issues with screenshots and marking the problems with red circles around them?

It will help the developers to find out and fix your issues more quickly.

We have also logged your comments and reopened this issue with id: CELLSNET-40639

Thanks for your cooperation.

Omg this could turn into a full time job! Can you not just fix it so it supports the xls template? Everything was working fine using that template except for the null values in the area graph. With the xlsx template, there are so many formatting issues I wouldn’t even know where to begin, and it’s probably going to take you quite a while to sort through them all. Also, different exports are going to have different data and probably will each exhibit different formatting issues, so we will have to completely regression test all of the functionality from scratch, which I am hesitant to do. We will never get to release this if we go that route!

Hi,

After further investigation, we found that the area chart with null values in Excel 2003 is different in Excel 2007.

Aspose.Cells tries to fit this case according the source file format (.xls or .xlsx) .

If you want get the Excel 2007 or 2010 results, please send the .xlsx template file to us. The .xlsx file helps us figure out these issues as quickly as possible.

Also, we will provide a fix to solve the disappeared date label of category axis tomorrow.

Attachment: 40639.zip

The template file that I sent you originally and that you fixed the issue for was an .xlsx file. I need the issue fixed for the xls file, which was my original output. I only changed it to xlsx because you said you thought the issue was a bug in Excel 2010 and I forgot to change it back to xls. Can you not just save the original xlsx file that I attached as xls in Excel and make sure that the null as zeros issue works for that as well?

Hi,

We fixed the disappeared label issues for xlsx format file.

Please download and use this latest fix: Aspose.Cells for .NET v7.2.1.4 and let us know your feedback.

Are you planning to fix the null as zeros issue for the xls format? As I said, we don’t want to have to regression test all of the functionality, which we would have to do if we switch to the xlsx format. Plus the xlsx Excel output looks even worse than the PDF, and we may want to make the Excel output available to our internal users. It’s not just the disappearing label issue.

Hi,

Thanks for your input.

It seems like your problem is not clear. Could you please clarify it with screenshots thoroughly?

It will be difficult for you to do it but it will help the development team to look into your issue better and you will get a fix as you desired quickly.

Thanks for your help.

Anyway, I have again logged your comment against the issue id: CELLSNET-40639

We will get back to you asap.

Hi,

Please follow this thread. Thank you.

Export to PDF chart different from Excel version - 2

The issues you have found earlier (filed as CELLSNET-40639) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.