How to remove the header and row line number for Excel to PDF Export?

grafik2.jpg (231,4 KB)
When i use Aspose Cells for Java to export an Excel table to PDF, there is always header and row line number, just like this Screenshot, header like “ABCDEFG” and row line number like “12345”.

Is there a way to remove such header and row line number in PDF export?

@zwei
Thank you for providing the screenshot.

Could you please zip and attach your sample files, including the input Excel file (if any), the current output Excel file generated by Aspose.Cells? We will review your issue soon.

test.7z (59 Bytes)

It is the Excel file, because the forum doesn’t support xlsx file upload, so I zip it as 7z, just unzip it as xlsx

Our desired result is a PDF export without header/row-line-numbers.

@zwei
I unpacked the zip file you provided, but it’s empty. Please confirm.

Original_XLSX.zip (543,2 KB)

Sorry, my bad, false operation. Now it is the zip file of the Excel table.

@zwei
We used ver24.2 to convert your file, please check the output file.
Original_XLSX.java.pdf.7z (566.8 KB)
There were no header and row line numbers. Would you be willing to provide the code for us to further investigate?
our code as follow:

Workbook workbook = new Workbook("Original_XLSX.xlsx");  
PdfSaveOptions pdfSaveOptions = new PdfSaveOptions();
pdfSaveOptions.setOnePagePerSheet(true);
workbook.save("Original_XLSX.java.pdf",pdfSaveOptions);

Thanks for your code, that is already enough for me.

@zwei,

It is nice to know that your issue is sorted out now. Please feel free to write us back if you have further queries or issue, we will be happy to assist you soon.

1 Like