We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Cell borders are missing when aspose cells convert excel to pdf

when Im trying to convert excel to pdf the cell border are missing. Just it is displaying only content.

This is the code i have used for the conversion.

com.aspose.cells.Workbook book = new com.aspose.cells.Workbook(srcFilePath);

here even Im attaching the document which will show both files(Excel and PDF). It is converting succesfully to pdf but all the cells margings are missing.Converting Excel Docs to PDF (3).zip (168.9 KB)


Thanks for using Aspose APIs.

Please provide us your Excel file and the output PDF as you have shown in MS-Word file. Please also provide us your sample code. You should also give a try to most recent version i.e. 18.6 and see how it goes.

we are using java programming language.I have tried using the latest version (18.5).
I have already send you the sample code.
This is the code i’m using to convert excel to PDF.

com.aspose.cells.Workbook book = new com.aspose.cells.Workbook(srcFilePath);

here are our environment details.
java 7 32 bit version
aspose-cells-18.5.jar(this is the latest one i found in your repositary)

I’m sending you the sample excel file and conveted file pdf.StudyDocument_5578.pdf (54.8 KB)
Documents.zip (61.7 KB)


Thanks for the template file, output PDF and sample code.

You meant gridlines are not rendered with contents, is not it? Well, if you could open your template file into MS Excel and take the print preview of the worksheet in MS Excel manually, you will also notice that those gridlines borders are not shown too. The gridlines (borders) are only for display purpose only when opening into MS Excel manually. Aspose.Cells does render Excel to PDF based on what is shown in print preview of the worksheets. If you need to print the gridlines with data, you may try the following lines (in bold) of code:
Sample code:

com.aspose.cells.Workbook book = new com.aspose.cells.Workbook(srcFilePath);
for(int i = 0; i< book.getWorksheets().getCount(); i++)

Hope, this helps a bit.

Thanks. you solved our issue.


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.