如果您的单元格中有逗号,请用双引号将整个单元格括起来,例如:
cell 1,cell 2,"This is one cell, even with a comma",cell4,etc
并且,如果您想要字面双引号,请执行其中两个,例如:
cell 1,cell 2,"This is my cell and it has ""quotes"" in it",cell 4,etc
至于日期,请坚持使用ISO格式,并且应该没问题(例如yyyy-mm-dd hh:mm:ss)
在.net中编写CSV文件
如果您的单元格中有逗号,请用双引号将整个单元格括起来,例如:
cell 1,cell 2,"This is one cell, even with a comma",cell4,etc
并且,如果您想要字面双引号,请执行其中两个,例如:
cell 1,cell 2,"This is my cell and it has ""quotes"" in it",cell 4,etc
至于日期,请坚持使用ISO格式,并且应该没问题(例如yyyy-mm-dd hh:mm:ss)