Monday, August 3, 2009

CSV export to MS Excel, SYLK file error

I just received the following error when creating a CSV formatted file of some report data, and opening it in Microsoft Excel:
Excel has detected that 'xxx.xls', is a SYLK file. Either the file has errors or it is not a SYLK file format. Click OK to try to open the file in a different format.
After some research it turns out this problem occurs if the first two letters in the file content is ID (in uppercase). The only way to get rid of this error message is therefore to not use ID in uppercase (Id, id is ok), or change it to something else.