Total for Java, aspose-cells 25.9, the result .pdf lacks a table in source .xlsx

Total for Java, aspose-cells 25.9, the result .pdf lacks a “logical table” in source .xlsx The file is very weird to me. I’ll attach bot the source and the target file (of the conversion).

@jouko.tiihonen

Summary
When converting an XLSX workbook that contains an Excel table (ListObject) to PDF with Aspose.Cells, the visual representation of the table can sometimes be missing in the generated PDF.

Why it happens

  • The conversion process may be using options that render only the raw data and omit the formatting that defines the table (borders, banding, etc.).
  • Some older releases of Aspose.Cells handled ListObjects differently, which could lead to the table’s visual elements not being transferred to the PDF.
  • If the table was created by a macro or an external tool, Aspose.Cells might not recognise it as a proper ListObject and therefore render it as plain cells.

What to do next

  1. Check the conversion code
  • Locate the Java call that saves the workbook as PDF (e.g., workbook.save("output.pdf", SaveFormat.PDF)).
  • Look for any PdfSaveOptions that are being set, or confirm that the default options are being used.
  1. Adjust PDF‑save options
  • Ensure that options which limit rendering to data‑only are disabled, so that table formatting is preserved.
  • Verify that grid lines or borders are enabled in the options.
  • If you are explicitly setting a table layout, try using the default layout to see if the table appears.
  1. Test with a newer Aspose.Cells build
  • If possible, run the conversion with a more recent version of Aspose.Cells. Newer releases often contain fixes for handling ListObjects.
  1. Validate the source workbook
  • Open the XLSX in Microsoft Excel and confirm that the area in question is an actual Excel Table (ListObject) and not just formatted cells.
  • Export the same sheet to PDF directly from Excel (File → Save As → PDF) to verify that the table renders correctly with the native tool.
  1. Compare the results
  • After adjusting options or upgrading the library, generate the PDF again and compare it with the original PDF to see if the table is now visible.
  1. Gather more information if the issue persists
  • Provide a minimal reproducible sample of the XLSX file.
  • Include any console output, warnings, or exceptions produced by Aspose.Cells during conversion.
  • Indicate whether the problem occurs with all workbooks that contain tables or only with this specific file.

Following these steps should help you identify why the table is missing in the PDF and guide you toward a solution. If the problem remains after trying the above, sharing the relevant code and a sample file will allow for more precise troubleshooting.

:warning: I could not fully verify this explanation against the retrieved sources. Please double-check the behaviour in your environment and confirm the exact SDK/version.

Picture-of-the-xlsx-and-pdf.jpg (337.5 KB)

1-table-missing_255405_258808_liite(pdf).zip (32.0 KB)

1-table-missing_255405_258808_liite.pdf (97.5 KB)

1-table-missing_255405_258808_liite-xlsx.ok.log.zip (1.2 KB)

@jouko.tiihonen
Print area “E2:L32” is set, so only “E2:L32” was exported to pdf.
Please check print view in MS Excel, you will get the same result.
1, Please remove print area setting from template file in MS Excel(Page Layout → Print Area ->Clear Print Area)
2, You also can clear with PageSetup.PrintArea = null; to clear it.

  foreach (Worksheet sheet in workbook.Worksheets)
  {
      sheet.PageSetup.PrintArea = null;
  }

Thank you! Very good suggestions! It really made sense to ask for help.

Is it possible to find a signal of this kind of situation in the data which Aspose converter returns, in this case in this text:
"


The transparency is prohibited (‘Group’ key)
The transparency is prohibited (‘Group’ key)
The transparency is prohibited (‘Group’ key)
The transparency is prohibited (‘Group’ key)





Metadata key does not exists




ExtGState ‘ca’ value shall be 1.0
ExtGState ‘ca’ value shall be 1.0
ExtGState ‘ca’ value shall be 1.0
ExtGState ‘ca’ value shall be 1.0
ExtGState ‘ca’ value shall be 1.0
ExtGState ‘ca’ value shall be 1.0
ExtGState ‘ca’ value shall be 1.0

"

<File Version="1.7" Name="" Pages="3">
    <Security/>
    <Catalog/>
    <Problem Severity="Error" Clause="6.4" ObjectID="23" Page="2" Convertable="True">The transparency is prohibited ('Group' key)</Problem>
    <Problem Severity="Error" Clause="6.4" Page="1" Convertable="True">The transparency is prohibited ('Group' key)</Problem>
    <Problem Severity="Error" Clause="6.4" Page="2" Convertable="True">The transparency is prohibited ('Group' key)</Problem>
    <Problem Severity="Error" Clause="6.4" Page="3" Convertable="True">The transparency is prohibited ('Group' key)</Problem>
    <Header/>
    <Annotations/>
    <Fonts/>
    <trailer/>
    <Metadata>
        <Problem Severity="Error" Clause="6.7.2" Convertable="True">Metadata key does not exists</Problem>
    </Metadata>
    <objects/>
    <xObjects/>
    <actions/>
    <Problem Severity="Error" Clause="6.4" Page="2" Convertable="True">ExtGState 'ca' value shall be 1.0</Problem>
    <Problem Severity="Error" Clause="6.4" Page="2" Convertable="True">ExtGState 'ca' value shall be 1.0</Problem>
    <Problem Severity="Error" Clause="6.4" Page="2" Convertable="True">ExtGState 'ca' value shall be 1.0</Problem>
    <Problem Severity="Error" Clause="6.4" Page="2" Convertable="True">ExtGState 'ca' value shall be 1.0</Problem>
    <Problem Severity="Error" Clause="6.4" Page="2" Convertable="True">ExtGState 'ca' value shall be 1.0</Problem>
    <Problem Severity="Error" Clause="6.4" Page="2" Convertable="True">ExtGState 'ca' value shall be 1.0</Problem>
    <Problem Severity="Error" Clause="6.4" Page="2" Convertable="True">ExtGState 'ca' value shall be 1.0</Problem>
</File>

@jouko.tiihonen,

Could you please clarify if the XML snippet you shared is related to the PDF/A validation or conversion features, or another file format, please specify? Additionally, was this XML generated using Aspose.PDF or an external tool? kindly elaborate and provide complete details.

It is from the phase pdf → pdf/a (the main task we have to do).

“sheet.PageSetup.PrintArea = null” → Bad result (for example 1 pages → 9 pages)

I would like to know ans test if setFitToPages works well. What units this wide and tall arguments use?
sheet.getPageSetup().setFitToPages(int wide, int tall);

We have received your feedback, we will analyze it as soon as possible, and then give you a reply.

@jouko.tiihonen,

Please post your queries and relevant issue(s) in Aspose.PDF forum category with all the details and sample files. One of our colleagues from Aspose.PDF team will evaluate and assist you accordingly soon. By the way, you may also simply use Aspose.Cells for Java API to directly save to PDF/A or other PDF compliance, see the document: Convert Excel file to PDF format compatible with PDFA-1a|Documentation for your reference.

If you think there is any issue on Aspose.Cells for Java part, kindly do elaborate it with sample files (input and output files) and sample code snippet using Aspose.Cells for Java API. We will check your issue soon.

This method sets the number of pages the worksheet will be scaled to when it’s printed or rendered to PDF. The method works as well and as expected. Both wide and tall arguments are of integer type, which denotes how many (number of) pages (wide and tall) you would like to render.