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) |
Use examples:
When we use <% @page contenttype= "application/vnd.ms-excel; Charset=utf-8 "%> method to export a JSP file as Excel, if the exported data has a number starting with 0, then the 0 will be omitted, in order to keep the first 0, you can add in the table style:
Style= ' Mso-number-format: "\@";
In this case, the number of the first 0 in the table that is exported will retain the 0.