Default grey cell borders converted into dotted lines


When converting a sheet with cells having the default grey cells border, the resulting pdf displays dark dotted lines instead.
Please find here attached an example of the pdf resulting from a save in Excel and from a conversion using Cells.
05-259-9999_V2_Stü (161.7 KB)



Thanks for using Aspose APIs.

We were able to observe this issue as per your description with most recent version and logged it in our database for investigation and for a fix.

This issue has been logged as

  • CELLSNET-45571 - Default grey cell borders converted into dotted lines


Workbook wb = new Workbook("05-259-9999_V2_Stückliste.xls");
wb.Save("output-" + CellsHelper.GetVersion() + ".pdf");

Output Pdf Download Link:
output- (72.9 KB)



Microsoft Excel has inconsistent behavior, when you print preview it (see our attachment “gridline_screenshot.png”), you can see the gridlines are dotted, but when you save it to pdf, the gridlines are solid.

Aspose.Cells always uses dotted lines for gridlines, so we may not fix this issue for consistency.

gridline_screenshot.png (71.9 KB)


Print preview displays dotted lines as that is a graphic interface, not a resulting document. But if you generate a pdf either by printing to a pdf or by saving as a pdf the dots disappear in the resulting document: the final pdf contains thin, continuous lines



Since it is an inconsistent behavior, we have logged your comment in our database against the ticket for product team investigation. Once, there is some news for you, we will let you know asap.



We will add a property that will let you change gridlines to solid. Will it be OK for you? Let us know your decision so that we add the property for your needs.


Thank you, that would be a good solution for us.



Thanks for your confirmation. We will look into it and implement it.



This is to inform you that we have fixed your issue (logged earlier as “CELLSNET-45571”). We will soon provide you the fixed version after performing QA and incorporating other enhancements and fixes.



Please download and try the following fix and let us know your feedback.

Please use the following sample code with the provided fix.


Workbook wb = new Workbook(srcFile); 

PdfSaveOptions saveOpt = new PdfSaveOptions() 
	GridlineType = GridlineType.Hair 

wb.Save("outFile.pdf", saveOpt);


Our project compiles for .net 3 and I’m afraid your dll is for another version (having issues compiling in VS2008) can you please provide a .NET 3 compatible version?



Please try our latest version/fix: Aspose.Cells for .NET v17.8.5:

Let us know your feedback.


Unfortunately teh result is still not as expected.
You can find the source .xls file and the pdf resulting from the conversion here:
The result has been obtained using Cells 17.8.5



Thanks for the template file and PDF.

I did evaluate your issue a bit using your template file. If you could take the print preview of the sheet in MS Excel manually you will also see the lines are dotted. Aspose.Cells does render Excel file to PDF as the MS Excel file is shown in the print preview of for the sheets.


The print preview is a GUI interface, and comparing a GUI interface on screen to a printable file is a bit like mixing apples and oranges. The print preview is an approximation, a semplification for screen purposes, not something that you print and keep as documentation.
We and the customer compare resulting files with resulting files and would like to have a resulting file from Aspose similar to a resulting file obtained from Excel.



Please try the following sample code (as suggested before), it will fix your issue as I tested with your template file:
Sample code:

Workbook wb = new Workbook(srcFile); 

PdfSaveOptions saveOpt = new PdfSaveOptions() 
	GridlineType = GridlineType.Hair 

wb.Save("outFile.pdf", saveOpt); 

Let us know if you still find any issue.


I tested with your code, and it looks OK, thanks.
I apologize for the mistake



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


The issues you have found earlier (filed as CELLSNET-45571) have been fixed in Aspose.Cells for .NET 17.9.