Missing Data when an Excel (Xlsx)file is converted into PDF

Issue Description:

When then Xlsx file is converted into PDF in the Aspose checker, there is a missing data in the PDF.
Please check the last of 4th line of page 3 in the xlsx file and the converted PDF.

Tested version Aspose 23.1.0 and 23.10.0
Aspose.zip (66.0 KB)

@IDBSSupport

It seems you are experiencing an issue with missing data when converting an Excel (Xlsx) file to PDF using Aspose. This can sometimes occur due to various reasons, such as formatting issues, hidden rows or columns, or specific settings in the conversion process.

Here are some steps you can take to troubleshoot and potentially resolve the issue:

  1. Check for Hidden Rows/Columns: Ensure that there are no hidden rows or columns in your Excel file that might be causing data to be omitted during the conversion.

  2. Review Page Setup: Verify the page setup in your Excel file. Sometimes, the print area or margins can affect how data is displayed in the PDF. Make sure that the content fits within the printable area.

  3. Update Aspose.Cells: Since you mentioned testing with versions 23.1.0 and 23.10.0, ensure you are using the latest version of Aspose.Cells, as updates often include bug fixes and improvements.

  4. Conversion Settings: When converting, you can customize the settings to ensure that all data is included. For example, you can adjust the PdfSaveOptions to control how the Excel file is rendered in PDF format.

Here is a basic example of how to convert an Excel file to PDF using Aspose.Cells in Java:

import com.aspose.cells.*;

public class ExcelToPdf {
    public static void main(String[] args) {
        try {
            // Load the Excel file
            Workbook workbook = new Workbook("path/to/your/excel/file.xlsx");
            
            // Create PdfSaveOptions
            PdfSaveOptions options = new PdfSaveOptions();
            options.setOnePagePerSheet(true); // Adjust as needed
            
            // Save the workbook to PDF
            workbook.save("path/to/output/pdf/file.pdf", options);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
  1. Check the Output PDF: After conversion, carefully review the output PDF to see if the missing data appears. If the issue persists, consider sharing the specific Excel file for further analysis.

If these steps do not resolve the issue, you may want to check the Aspose documentation or community forums for similar cases, as other users may have encountered and resolved similar problems.

If you need further assistance, feel free to provide more details about the specific data that is missing, and I can help you troubleshoot further.

@IDBSSupport
By testing on the latest version v25.1 using sample file and the following sample code, we can reproduce the issue. Missing Data when the sample file is converted into PDF.

Workbook wb = new Workbook(filePath + "20250205_sample_ms_p_gothic.xlsx");
wb.Worksheets[0].AutoFitRows(true);
wb.Save(filePath + "out.pdf");

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): CELLSNET-57796

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

@IDBSSupport,

We also reproduced the issue using Aspose.Cells for Java v25.1 with the following sample code:

Workbook wb = new Workbook("d:\\files\\20250205_sample_ms_p_gothic.xlsx");
wb.getWorksheets().get("XXX-2").autoFitRows(true);
wb.save("d:\\files\\out1.pdf");

It seems you are using Aspose.Cells for Java. Please confirm if you are using Aspose.Cells for Java, so we could update/log appropriate ticket for Java into our database to fix it soon?

@IDBSSupport ,

The pdf you shared is generated by Aspose.Cells for Java. We have moved the ticket to Java:

Issue ID(s): CELLSNET-57796 -> CELLSJAVA-46264

The issues you have found earlier (filed as CELLSJAVA-46264) have been fixed in Aspose.Cells for Java 25.2.

@amjad.sahi yes we use Java

@IDBSSupport
Thank you for your feedback. We have fixed this issue. Please trye the Aspose.Cells for Java 25.2.