CSV file detected as SYLK file in Excel

Working on some CSV export code and encountered this weird error when opening the CSV file in Excel,

Excel has detected that 'test.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.

The file was certainly a CSV file; I had no clue what an SYLK file was.

The issue, as I discovered here, is due to the first 2 letters in the file being “ID” (which was the name of the first column); change this to something else (e.g. “Id”) and the file loads correctly without any warnings or errors.

2 Comments

  1. Guest

    I think the problem is that the first two characters of your text file
    are “ID”. This identifies the text file as a SYLK (SYmbolic LinK) file.

  2. Hey man thanks for posting this! What a nice little find! Saved me a packet of time!!!