CSV for Excel, Including Both Leading Zeros and Commas

后端 未结 12 927
再見小時候
再見小時候 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条回答
  •  萌比男神i
    2020-12-02 19:40

    Pretty old thread but why don't you just add whitespace after your value. It will be then treated as string and no leading zeros will be stripped.

    "001,002"." "

提交回复
热议问题