Cell borders are displaying when they should not be

Support,

We are attempting to render Excel Worksheets to HTML for web viewing. In our testing, we found cell borders are displaying in the web viewing when the document does not display the borders.

I have included a sample Excel document which will allow you to reproduce the issue.

Please use the "Results Template" worksheet for your testing.


Thank you

Hi Abby,

Thanks for using Aspose.Cells.

I am not able to find the issue of cell borders. I have converted your xlsm file into html with the latest version: Aspose.Cells
for .NET v7.7.1.1
. I have attached the output html screenshot showing the MS-Excel and Aspose.Cells output for your reference.

Could you please provide a screenshot showing this issue for our reference?

Screenshot:

Hi,

I have attached a screenshot document of our issue.

Thank you




Hi Abby,

Thank you for providing the snapshot for our reference.

We have re-evaluated your presented scenario on our end while using the latest version of Aspose.Cells for .NET 7.7.1.2. Unfortunately the issue didn’t replicate as you may also observe from the attached snapshot. I would request you to please give the latest version a try on your end to see if it makes any difference.

Code to convert your provided spreadsheet to HTML is as follow,
C#


Workbook book = new Workbook(myDir + “Document 5.xlsm”);
Worksheet sheet = book.Worksheets[1];
sheet.AutoFitColumns();
sheet.AutoFitRows();
HtmlSaveOptions option = new HtmlSaveOptions();
book.Save(myDir + “output.html”, option);


In case you are doing any manipulation before rendering the spreadsheet to HTML then please provide your complete source code for our review.

Hi,

We retested using the lastest version of Aspose.Cells for .NET 7.7.1.2 and was still able to reproduce our issue.

We believe the reason for our issue is because the text is bleeding over into the other cell. Could you please try to reproduce by having the text bleed over into the other cell? If this scenario still works for you, could you please provide a sample code of where the text bleeding works.

Thank you

Hi Abby,

Thank you for your response.

I have worked again with your provided sample and I am still unable to spot any issue in the resultant HTML file. If you check the code snippet posted here, you may observe that I am calling the Worksheet.AutoFitColumns and Worksheet.AutoFitRows method before converting the workbook to HTML format. Due to these two calls, column width and row height are adjusted according to the text in the cells. Without calling Worksheet.AutoFitColumns, I can see the text “Agreed to documentation” in I13 and I14 is spanned over to the adjacent right cells. You may also confirm by converting your sample spreadsheet manually using the MS Excel application to check how the text is rendered in HTML files.

I have attached the output of my test in an archive with this post. I would request you to please check the output in detail and take a snapshot of the problematic area if you could find anything that is not desired.