In doing the project, encounter title problem. For example, to export resident information to Excel, the resident's ID number is too long (greater than 10 digits), and Excel automatically converts an excessive number string into scientific notation. Now find one of the solutions on the Web:
(It is not possible to add blank content such as "" or "" or "tab" before or after the string, and Excel will automatically remove these.) Unless you add it in the middle of the number string, of course it's not what we want.
One solution:<td style= "Mso-number-format: ' \@ ';" >100821199909091234</td>
added style= "Mso-number-format: ' \@ ';" Style can be resolved, (the above for personal testing, feasible)!
Other custom cell formatting styles
Mso-number-format: "0" |
NO Decimals |
Mso-number-format: "0\.000" |
3 decimals |
Mso-number-format: "\#\,\#\ #0 \.000" |
Comma with 3 Dec |
Mso-number-format: "Mm\/dd\/yy" |
Date7 |
Mso-number-format: "Mmmm\ d\,\ yyyy" |
Date9 |
Mso-number-format: "M\/d\/yy\ h\:mm\ am\/pm" |
D-t AMPM |
Mso-number-format: "Short Date" |
01/03/1998 |
Mso-number-format: "Medium Date" |
01-mar-98 |
Mso-number-format: "D\-mmm\-yyyy" |
01-mar-1998 |
Mso-number-format: "Short Time" |
5:16 |
Mso-number-format: "Medium Time" |
5:16 am |
Mso-number-format: "Long Time" |
5:16:21:00 |
Mso-number-format: "Percent" |
Percent-two Decimals |
Mso-number-format: "0%" |
Percent-no Decimals |
Mso-number-format: "0\. E+00 " |
Scientific Notation |
Mso-number-format: "\@" |
Text |
Mso-number-format: "\#\??? \/???" |
Fractions-up to 3 digits (312/943) |
Mso-number-format: "\0022£\0022\#\,\#\ #0 \.00" |
£12.76 |
Mso-number-format: "\#\,\#\ #0 \.00_ \; red\-\#\,\#\ #0 \.00\ " |
2 decimals, negative numbers in red and signed (1.56-1.56) |
Solve HTML export Excel table numbers into scientific counting method