MS Excel for HTML grid is missing in Google Chrome

I am trying to convert from an Excel spreadsheet (.xls) to html through MS Excel 2010, but I want to save the grid. Therefore, I select all cells β†’ cell format β†’ outline and internal borders of the preset, the normal border, black, and then export. Viewed using IE and Firefox, the borders are there. However, when viewing with chrome, the borders disappeared, and instead I see style = "border-left: none;" inside each td tag.

The purpose of this is to do an Excel preview for the web page, and it seems like the export-to-html route is probably the easiest. Does anyone know a better route?

I think the only solution could be to simply check javascript specifically for chrome and edit the left / right / top / bottom border styles in all td tags. Is something missing?


Also, is there a way to keep row numbers and column headers in the html version?

+6
source share
3 answers

You can search / replace for all instances where the source code reads border-left:none , border:none , etc ... then use css styles to make sure the grid lines stay with the data. Assuming it is exported as a table, use

 <style type="text/css"> table{ border: 2px solid #000000; } td{ border: 1px solid #000000; } </style> 

(format to your liking and taste)

As for row numbers and column headings, it depends on how much data you have. If there are not many, it would be easiest to enter headings and numbers. If this is a lot, the best way would be to use javascript or a server language to print the line headers for you.

+4
source

a very lazy fix is ​​to select a larger grunge border in excel before saving as a web page. Some time ago I was looking for me, and this fix I found, and I used it since then, I supported a hockey pool that exported daily statistics of teams and tables in tables, and with this trick it looked just fine.

+3
source

An alternative way is to access your Google drive, import the xls file and upload it as an html file. The generated webpage works great in both Chrome and IE.

+1
source

Source: https://habr.com/ru/post/890955/


All Articles