Visualization of converting json to excel.json (2)

The first problem is that the tool to generate the table can only be used in ie9 and above, and our system is ie5. See the previous article for the solution.

Then the blob that generates excel can only be used under ie9.
Found a method

window.navigator.msSaveOrOpenBlob(blob, fileName);

Then the generated excel does not contain a border, and it is found that the style of setting the table is ok.

table width="100%" border="1" cellpadding="0" bordercolorlight="#999999" bordercolordark="#FFFFFF" cellspacing="0" style="float:left">

Later, the too long number
excel defaults to scientific notation. It should be displayed as a text, and then set the cell style of the html excel, and then save it. The text opens excel and finds it.

<col width=1170 style='mso-width-source:userset;mso-width-alt:37440;
 width:878pt'>

Just add this to each column
Insert picture description here

The problem is solved.

The problem can be solved by Baidu I found that I can be a scientist

Guess you like

Origin blog.csdn.net/wangduqiang747/article/details/103616368