开发者

CSV first cell restrictions

If I create csv file (I'm doing it from C#), which contains text "ID" in first cell in first row, MS Excel 2010 fails to open it, it says, file is not a valid csv file. I spend a half of an hour, before I realized that problem is with that "ID". Most interesting thing in this situation is, that if "ID" is moved to any other cell, everything works just fine.

Steps to reproduce : Create text file with following content:

ID,Name
1,Unnamed

Save开发者_如何学C it.Change extension to csv.

That's all, MS Excel 2010 will tell you that this file is not a csv and will fail to open it!

What I am doing wrong?I googled for some info, but it seems, ID is not some kind of reserved word.

I'm running Win7Enterprisex64 and using MS Excel 2010, as I mentioned. P.S depending on your culture settings, csv separator may be , or ; (maybe some other characters)


The problem is that Excel thinks the file is a "SYLK" file. It is a known issue.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜