Archive for September, 2009

Excel has detected that ’somefile.csv’ is a SYLK file, but cannot load it.

Wednesday, September 9th, 2009

I am writing some software that generates CSV files to be opened by the default CSV application on the system. I just spent about 30 minutes troubleshooting this MS Excel 2007 error when opening one of my CSV files:

“Excel has detected that ’somefile.csv’ is a SYLK file, but cannot load it. 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.”

As it turns out, this error occurs when the first 2 characters of the first column nameĀ in a CSV file are “ID” (All upper-case).

The solution: Change “ID” to anything else. One or both characters can even be lower-case and that will solve this error.

I hope this saves some time for someone else out there.