Solve HTML export Excel table numbers into scientific counting method

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.