Excel converted to PDF with Excel Table Missing

Hi

We are converting Excel Files with the following Java SDK :slight_smile:
com.aspose
aspose-cells
20.1

We have a complex Excel file, but when converted in PDF, the Tables 3 to 15 of the second sheet are completely missing in the PDF.

Regards
A9R15dco1a_16xzfvc_218s.pdf (352.0 KB)problème_version.zip (120.6 KB)

@jfreguer,

We have evaluated your issue and found there is specific printable area set for your mentioned sheet (in MS Excel, click the sheet tab, open Page Setup dialog and check Print area which does not cover all the data range of the sheet). That’s why when you render either by MS Excel or via Aspose.Cells, it just renders specific area only and misses certain part of the sheet (mind you, both Aspose.Cells and MS Excel renders to PDF based on what is shown in the print preview of the sheet). To fix the issue, please either remove the printable area or set the area to cover the whole range. You can do that either by using MS Excel or via Aspose.Cells in code. See the sample lines of code for your reference.
e.g.
Sample code:

    Workbook workbook = new Workbook(filePath);
    Worksheet sheet = workbook.getWorksheets().get("FRANCHISE CULTURE");
    // remove the printable area
    sheet.getPageSetup().setPrintArea("");
    workbook.save(outFilePath, SaveFormat.PDF);

Let us know if you still find any issue.

Hi

Thank you very much for your help, it solves our issue.

Great !

@jfreguer,

Good to know that your issue is sorted out by the suggested code. Feel free to contact us any time if you need further help or have some other issue or queries, we will be happy to assist you soon.