Free Support Forum - aspose.com

Problems with converting Excel to Pdf

Hi

We are currently using Aspose.Cells to read excel-files uploaded by our users, and have now gotten new requirements where we have to store a pdf-versjon of the excel file. I have experimented with the “save to pdf”-function in Aspose.Cells 4.8, but have found an issue: In some cases values in hidden columns are rendered in the pdf, overlapping the values in the adjacent visible column.

Also, I noticed that controls with the PrintObject property set to false are still rendered to the pdf, even though they do not appear when printing from Excel.

I have attached a zip-file with an example excel file with the “B” column hidden, where the contents of some of the cells in “B” are rendered in the “C” column in the pdf. Also, there is two ComboBox controls with different PrintObject settings, only one of the is shown on print preview in Excel, but both appear in the pdf.

Here is the unit-test code I used to convert it:


[TestMethod]
public void TestPdf()
{
Aspose.Cells.License license = new Aspose.Cells.License();
license.SetLicense(“Aspose.Cells.lic”);

string filnavn = @“C:\xls2pdf-test\test4.xls”;

FileStream fs = new FileStream(filnavn, FileMode.Open);

Aspose.Cells.Workbook x = new Aspose.Cells.Workbook();
x.Open(fs);

x.Save(filnavn + “.pdf”, Aspose.Cells.FileFormatType.Pdf);
fs.Close();
}

Hi,

Thank you for considering Aspose.

rune:
In some cases values in hidden columns are rendered in the pdf, overlapping the values in the adjacent visible column

Please try the attached latest version of Aspose.Cells as I tested your template file with it and it works fine (resultant file attached).

rune:
Also, I noticed that controls with the PrintObject property set to false are still rendered to the pdf, even though they do not appear when printing from Excel.

We have found your mentioned issue. We will look into it and get back to you soon. You issue has been registered in our issue tracking system with issue id CELLSNET-11901.

Thank You & Best Regards,


Hi, and thanks for the quick response!

I’ve now run my test again with the latest version you attached, and it worked fine for me as it did for you :slight_smile: Looks like this was a bug in 4.8.0.0 which you already had solved since then.

Good to hear you are looking into the other issue as well.



Hi,

Please try the attached version, we have fixed your issue.

Thank you.


The attached version works great. Thanks!

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


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