Data loss when attached xls is converted to PDF

Hi,


When we convert the attached XLS file to PDF, then we get data loss. The data loss is for the drop downs present in the Excel workbook. But if I create a workbook with only drop-downs, then the text in the drop-down is shown. Can you please let me know why there is data loss in the PDF of this Excel workbook?

Thanks,
Nitesh

P.S.: I am attaching both the source(XLS) and target(PDF)

Hi,

Thanks for your posting and using Aspose.Cells for Java.

I was able to replicate this problem using your file with the following code using the latest version:
Aspose.Cells
for Java v7.3.0.3



We have logged this issue in our database. We will look into it and fix the problems. Once the issue is resolved or we haves some other update for you, we will let you know asap.

This issue has been logged as CELLSJAVA-40278.

Java


String path = “F:\Shak-Data-RW\Downloads\requirements.xls”;


Workbook workbook = new Workbook(path);

workbook.save(path + “.out.pdf”, SaveFormat.PDF);


Hi,


After look into your issue, I think it is due to the fact the there is printable area (“A1:F71”) specified for the first worksheet (In MS Excel click to open the PageSetup dialog and click the “Sheet” tab to see the print area that is already set). So when you render the sheet to PDF, it will be based on this area, so you do not see the drop downs. The PDF rendering will be based on the printable preview that MS Excel displays. For your requirement, either you need to extend the printable area or delete the printable area set in the sheet.

Here is the code that works fine.

Sample code:

String path = “requirements.xls”;

Workbook workbook = new Workbook(path);
//Delete the conjusted printable area.
workbook.getWorksheets().get(0).getPageSetup().setPrintArea(null);

workbook.save(path + “.out1.pdf”, SaveFormat.PDF);