CSV for Excel, Including Both Leading Zeros and Commas

后端 未结 12 914
再見小時候
再見小時候 2020-12-02 18:45

I want to generate a CSV file for user to use Excel to open it.

If I want to escape the comma in values, I can write it as \"640,480\".

If I want to keep the

12条回答
  •  [愿得一人]
    2020-12-02 19:31

    If you are using "Content-Disposition" and exporting from asp to excel using HTML tags,then you have to add "style='mso-number-format:\@;'" to that tag and making it to accept only Text values ,thereby leading zeroes omission will be avoided,If Forward slash"\" is accepted use double forward slash "\"

提交回复
热议问题