json-excel export table, the number string is converted to scientific notation

When using vue-json-excel to export a table in a vue project, the following problems occur:

If there is a long number string in the data to be exported (such as "2415746843132487"), after exporting excel, excel will automatically convert the long number string into scientific notation.

Insert picture description here

Solution:
Insert picture description here

Modify the vue-json-excel source code and add style="mso-number-format:'@';" to the td tag to solve it

The effect after the solution:
Insert picture description here

Reprinted at: https://www.cnblogs.com/Airon-wei/p/10942562.html

Guess you like

Origin blog.csdn.net/qq_41454044/article/details/103452846