How to Fix a CSV that Excel Detects as SYLK File

Yesterday after exporting some data from one of my WordPress site to CSV I got a rude shock after trying to open the file with Excel. According to it, apparently the file was not a CSV but a SYLK File.

Advertisements

Excel has detected ‘file.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.

Warning thrown by Excel

Now I was certain the file was a CSV since I had exported it using WP Export All. A quick search online unearthed this blog post which indicated that Excel was actually the problem. Reason: if the first cell on a CSV starts with ID, Excel just assumes you are trying to open a SYLK File.

csv id

From that post its self-explanatory that to fix the error you’ll just have to change ID with a different text. The problem with that however is if the CSV is going to be used elsewhere where its required that it start with ID.

That precisely was may case as I needed to import the CSV back into WordPress after I was done editing it. Fortunately I did find a workaround after contemplating using a different CSV editor.

So it’s pretty simple, do the following:

  1. Open the CSV with a text editor like Notepad and change ID into some text that doesn’t start with ID e.g temp
  2. Save the CSV then open it with Excel. This time it won’t throw you the SYLK file error. Do your editing and save the CSV.
  3. Open the CSV with the text editor again and change the edited text back to ID. Save the file and that’s it!

Cheers!

journeybytes web design

Leave a Reply

Feel free to share your comments or questions with me. I may not be able to respond immediately so please check later once I've approved your comment.

Your email address will not be published. Required fields are marked *