Alun Rowe

ramblings about cars, tech, web development and more. BOTB Winner in 2010

Excel CSV import returns an SYLK file format error

The Problem:

Trying to open CSV file that my app had generated kept causing the following message to appear in Excel:

Excel has detected that ‘balhblah.csv’ is an SYLK file, but cannot load it. Either the file has error or it is not a SYLK file format. Click OK to try to open the file in a different format’ , you may also get the message SYLK: File format is not valid

The solution:

After many hours of pulling my hair out trying to work it out I discovered that if you make the first letters “ID” of a text file Excel incorrectly assumes you are trying to open an SYLK file (whatever one of those is!).

Hope that helps!

PS Microsoft have a page on this now… http://support2.microsoft.com/kb/323626

Previous

F1 heads to SKY

Next

Codeigniter Beginners Tutorial Article

287 Comments

  1. Geoffrey Hashman

    I ran into this problem when creating a CSV file with the requirement that columns 1-2 of the first record – representing the first cell of the spreadsheet must contain uppercase “ID”.

    I kept getting “Unable to load SYLK file…” Ichanged that to “Id” – but that was not acceptable to the program into which this file was input.

    For the moment I have got around it by setting up the field as “ ID “ and seeing whther the next program is rigidly expecting :ID” in cols 1-2, or is it a “free-format field which allows for “ID” as floating characters.

    One can only hope and pray!!!

  2. Eric Blankenstein

    Thank you Alun for sharring this info – it has saved me pulling my hair and spending many hours to figure this out….

    Thank you and bless you for sharring this info.

  3. > 700 days later his post is still helping. Many thanks for saving me many hours of frustration.

    Wes

  4. Glad to still be of help!

  5. The way to fix this for a programmer is to put the apostrophe character (’) as the first character of the CSV file. Then when Excel opens it, it won’t say, “Error: its a SYLK file gone bad”.

  6. Jaspreet

    Put an apostrophe at the beginning of the first field and this irritating error goes away

  7. jojo

    Another code warrior salutes you!

  8. Tushar

    Thanks ! it helped..

  9. David

    refering to #5 above, the solution is not for the programmer or enyone else in the world to avoid using the characters ID in a CSV header. The solution is for Microsoft the remove such a stupid hard-coded logic.

  10. Looking at the MS knowledge base this should be fixed in the most recent versions of excel

    http://support.microsoft.com/kb/323626

  11. i cant save excel file in .csv format error you cant save multiple sheet in format
    how to save
    plz reply me.
    i cant save excel file in .csv format error you cant save multiple sheet in format
    how to save
    plz reply me.

  12. Alun Rowe

    Hi Khandu

    You can’t save a multi-sheet excel file as a CSV because csv’s don’t support multiple pages. Simply save each worksheet as a desperate CSV and name them in a sensible way for the other person to import e.g. mydata_sheet1.csv, mydata_sheet2.csv and so on

    Good luck!

    Alun

  13. ALEX

    THANK YOU , THANK YOU , THANK YOU

  14. Dennis

    Thanks!! Still useful!

  15. Wow, 2 years and a bit on and it’s still proving useful! Glad to have helped :)

  16. Mitch

    This didn’t help me for my requirements…

    What did help was this:
    —Save file as a .csv and close it.
    —Right click on the .csv file and Open with>Notepad
    —Go to File>Save As
    —Under Ecoding: select UTF-8
    —Click Save

  17. Jewfin

    HELL YEAH!!! Thanks.

  18. Frustrated

    Helped again, thanks

  19. Jeff

    Yup, still helping.

  20. Jay

    Thanks!

  21. F

    Thank you! :-)

  22. Andrew N

    Still a big help. Keep this alive (Incase you were thinking that no one is using this anymore) :-)

  23. Raf

    received the error message during import of a custom csv file about 3 minutes ago.
    googled it and this article resolved it in less than 60 secs.
    thanks!!!!

  24. Paul

    And there was me thinking it was my programming skills that sucked. Microsoft, as usual. Pfft. Suckers.

    On a serious note, thanks for the tip. I dread to think how many circles I would have went round if I didn’t discover it.

  25. Gary

    Changing ID to lower case id should also fix the problem.

  26. Jo

    Thank you – this helped me out as well! :)

  27. You are the best ! Thank you!!!!

  28. Jay

    Thank God for Google that found this.. I was pulling my hair out on this!

  29. Thank you!!!! You saved me much frustration.

  30. Abu Alam

    You saved my day. Lot of thanks. I have a csv file that has a column with header=“ID”. It was giving me SYLK error. But once I changed it to “Id”, it worked like magic.

  31. Tatiana

    Just ran into this problem. I have cell A1 of each of my CSV files as “ID”. Would’ve never figured this out on my own. Glad this post is still available here after so many years. Thank you so much for sharing. Cheers!

  32. Glad to still be of help

  33. Damien

    Thank you !

  34. Laurence

    I’m just thinking…thank GOD for the Internet!

  35. Jay

    Just another drive by thank you. This is more helpful than the offical MS help page on this topic.

  36. Vinutha

    GOD , Would have never figured out this.. wasted one whole day.

  37. Thanks mate.

  38. Sebastian

    Thanks for saving me hours of investigating.

  39. I want to have your babies. I love you. Thanks

  40. Homer

    Let’s us know how that works out! Thanks!

  41. Hamish

    It’s the “The file you are trying to open, ‘x.csv’ is in a different format than specified by the extension…” that gets me.

    Thanks for preventing me going blind looking for obscure and non-existent unprintable characters…

  42. David Willis

    Wow. I never would have guessed that was the issue. I changed the first cell from “ID” to “dbID” and now the error is gone. lol

    Thanks!

  43. This is amazing. Thanks!

  44. Ajay

    This is awesome help!

  45. Ella

    Thanks a lot!

  46. Steph

    Thank you!

  47. Piotr

    thank you, thank you, thank you!

  48. Simi

    wow Thanks! still not fixed I see. and still helping…………

  49. Joost Carpentier

    Thank you!

  50. Andy

    Thank you so much. Found this and fixed the error.

  51. Maria

    WOW!!!! Awesome! Thank you very much for this post!

  52. Gunnar

    Aargh! Thanks a lot – just wish I had seen your post a couple of hours earlier 😉

  53. Jen G

    Wow!, thanks for your post! That helped so much!

  54. Michael

    D’oh!; thanks for the post. Very helpful

  55. MarkW

    Thanks for taking away the pain – wish I’d checked your site YEARS ago. My previous solution was opening in Open Office then saving as .xls LOL

  56. Jon Rachiele

    Omg — Thank You so much

  57. Rolando

    Thank you, thank you, thank you!!!!!!!!!!!!!!

  58. scaevola

    Thanks man!

  59. Emeline

    Merci !!!!!! Thank you !!!!! You just saved the day !

  60. A thankful Python newbie

    Thank you so much for that info! Even though I have spent a few hours pulling my hair – I would never have arrived at that conclusion without your input.

  61. Sam

    Thanks a bunch!

    This still occurs in Microsoft Office Professional Plus 2010 (version 14.0.7173.5000), although Microsoft doesn’t admit it on their KB support page.

  62. I dont know what is more funny, the solution or how many csv files must begin with “ID”. Thanks for post.

  63. Andy T

    Thanks – your post came up in a google and most helpful. I am in the process of moving to Softmaker Office 2016 having previously used MS Office 2003. When moving back and forth I hit this problem and assumed incorrectly it was Softmaker trouble. Yes my database has ID for the first field (column) and hits this problem.

  64. adi

    thank you !!!!!!!!!!!!!!!!!!!!!!!!!!
    thank you !!!!!!!!!!!!!!!!!!!!!!!!!!
    thank you !!!!!!!!!!!!!!!!!!!!!!!!!!
    thank you !!!!!!!!!!!!!!!!!!!!!!!!!!
    you are the best
    worked

  65. Running Excel 2016 in the year 2017 and this is still a problem that you helped me solve! Thank you!

  66. thank’s bro , i just spend my 4 hours into this .

  67. This article is now 5 years old and it’s still helping! Amazed MS haven’t fixed it but the occasional gift from my Amazon gift list and a few affiliate fees for adverts cover off the over 1200 visitors per month just to read this article!

  68. RLU

    Wow – I wasted 3 hours on this problem – As soon as I looked it up (finally – dumb of me to wait) your fix came up!

  69. nah

    1st hit on google search, still an issue after all this time?

  70. Prashant Ganpat Dhuri

    Thanks buddy. You saved a ton of time…

  71. Jeff G

    Thank you for sharing this. I was so confused by the error and would have spend countless hours on the same issue!

  72. Shahabaz

    Still Helping

  73. From Argentina with Love

    Thanks this helped me too, March 31st, 2017

  74. Kirkwood Paul Donavin

    Thank you so much for pulling your hair out for us!

  75. Tom

    Thanks … would never have figured that out!!!

  76. Phil

    Another happy camper….I would never have worked that out myself

    …A thousand thanks mate !!!! 🙂

  77. Ed Flood

    Still helping, thanks a million!

  78. joshelui

    I solved this issue with:
    Application.DisplayAlerts = False
    Workbooks.Open Filename:=path, Local:=True
    Application.DisplayAlerts = True

    Where ‘path’ is a string variable with the path where the file is.
    Obviously this is a VBA solution.

    I hope this help you.

  79. Iguan

    Nice!

  80. Maria M.

    Priceless information! This thread will live on as you keep saving lives out there in MS World. Thank you!!!!

  81. Still helping 🙂

  82. Beach

    Yep.

  83. David

    And again today!

  84. Costi A

    Still useful. Thanks man.
    BR/ Costi A.

  85. Jackie

    OMG, thank you for saving me so much time.

  86. Jeff Langlois

    You sir, are a gentleman and a scholar.

    This resolved my issue so quickly!

    Well done.

  87. What a random error, but it also just happened to me !
    Is there anything we can do about it ?
    My CSV file needs to have “ID” as the first element.
    There is no way around it.

    • Why do you need ID as the first field? If you are outputting to Excel then you can choose anything as your output format. If you need to then send it on from there it you could then rename it once it is in the system or output it using a macro which renames the first column.

      Alternatively make ID the last column? most imports should sort it out for you?

  88. Eric

    Aug 14, 2017 and still helping!

  89. San

    Aug 29, 2017 and still helping!

  90. Mark

    Wow, years later and this is still awesome. Thanks for the heads-up!

  91. Mousumi

    Thank you so much for sharing this info.Very useful.

  92. SRamu

    Still helping. Thank you so much for this info.

  93. James

    We have discovered if CSV is changed to UTF-8, the SYLK problem disapears (without change ID to Id)

  94. PongoDog

    OMG ! How much time potentially this has saved me. THANK YOU for posting this information.

  95. renat

    Thank you for the information.
    For everyone who needs a workaround:
    https://stackoverflow.com/questions/29012344/opening-csv-file

  96. Abdul Hadi N

    Thank u

  97. Mike

    AMAZING! Saved me 8 hours of hair pulling. Damn excel!! THANKS!!!

  98. Mohamed

    So my very first cell was the state Idaho, what are the odds?

  99. Paul

    stiiiiilll helping

  100. Another grateful user!

    Still Helping!

  101. And Another!

    Ha Ha!! Still helping. I would never have worked that out!

  102. Nicola

    Thanks was very useful

  103. Dan Williams

    Still helping!
    Cheers!

  104. random it guy

    helpful defusing a panicked exec

  105. Amjad

    Trust me still helping

  106. Brian Spolarich

    This is the gift that keeps on giving

  107. rajen

    omg, thanks!

  108. M Miller

    Such a simple solution for such an annoying issue. THANK YOU!

  109. STILL HELPING! THANKS ALL

    WHY IS THIS STILL AN ISSUE AFTER 4 YEARS?!

  110. Mark

    Thank you for the quick fix!

  111. Stephanie

    STILL HELPING after SIX years!!!!!! Thank you 🙂

  112. Peter

    Another two thumbs up!!

  113. Daniela

    Still Helping! Thanks!

  114. Still helping. Thanks!

  115. Nicolas

    Still Helping! Thanks!

  116. Dave

    Still Helping!

  117. Joseph

    Still helping! 🙂 Thank you.

  118. AlyShutter

    Yep still helping =D 2018! Thank you!

  119. Lieutenant Geyser

    Haha this is amazing. Thank you for this.

  120. Cees

    Best post ever 😉 Saving me a bunch of time

  121. Steve Rawlinson

    Still Helping! Thank you.

  122. Joe

    Well done Alun. Magic internet

  123. Mike

    This is still helping as of February 15, 2018 – four years later. Microsoft has disabled the solution page listed above. Users now get the Microsoft version of the 404 File Not Found error, so can anyone explain WHY Excel does this? Or has anyone found the new link to Microsoft’s explanation?

  124. Celia

    Thanks a bunch! That prevented me from suicide 🙂

  125. DH

    Still helping

  126. Richartd Noakes

    Come on MS! This is a tiny task to fix – do it now!
    Far too much monkey see, monkey do. Too clever by half! Are you aware that many people import csv files where the first cell contains ID? And they want them to be csv, nothing else.

  127. Nikhil Bhansi

    24th Feb 2018 | Still Helping

  128. Robby

    26 Feb 2018 – same issue, sti9ll inresolved. Original poster’s work much appreciated

  129. STAN

    Thank you very much.

  130. AQ

    Thank you

  131. Mitisha

    Still helping

  132. Doug

    This is pathetic. Thanks to OP. Pulling my hair out trying to analyze data for my master’s thesis. I don’t have words for how angry I am at Microsoft right now.

    Still helping.

  133. Stuart

    Still helping March 2018!

  134. Alex Claudio

    This is still helping! April 2018!

  135. Tim

    Still helping 29th March 18.

    6 years later and Microsoft still can’t be bothered to fix it. Amazing.

  136. Owen

    Still Helping April 18

  137. David

    Another one saved April 2018 from this, frankly, beyond pointless “feature”.

    Thank you very much!

  138. mdcclxv

    Thank you!!!! U da man!

  139. Aromal

    Thanks Buddy 🙂

  140. Aman

    I found another option.no need to change the column heading order title. Just open a new excel and than open the file which you would like to open (SYLK format file), it will open this time.
    Hope this works for you guys as well.

  141. José Sanches

    Thank you! Still help !
    Jsanches

  142. José Sanches

    Thank you!

  143. Niborg

    Still helping!!!!

    Thanks!!

  144. Dhawal

    18th April 2018…
    Still helping!!!
    Thanks a ton, Alun!!
    Just a feedback that I am not able to open MS link given though.

  145. Gav Massingham

    I mean. Just wow Microsoft. Because no one ever wants the first column of their CSV file to be “ID” do they?

  146. Keren

    Thanks! Another person saved hours of trouble by this.

  147. Stacey Britton

    So glad to find this, thanks!

  148. -jm

    day 2,304 and still helping!

  149. Jem Shaw

    Aaaaaand solved!
    You rock.

    “Get Bill Gates in here!”

  150. I literally love you

  151. Francois Janoras

    9th May 2018
    … and still helping!

  152. Daniel

    Still Helping! Thank you

  153. CK

    Saved the day 6 years later!

  154. MT

    Still Helping!!, May 2018

  155. Sara

    Oh my goodness… This solution saved me hours. Thanks!

  156. Thomas

    Lifesaver

  157. melon

    thanks heaps for this.

  158. Niharika

    Thanks a ton. Saved lot of time.

  159. Hancel

    This answer will remain Gold for decades to come 😀
    Thank you so much

  160. Aparna

    Thank you.
    God saved the world.
    You saved my day.

  161. Larry Nee

    I found this abomination again today. Can’t wait to switch off of M$ crap in a year.

  162. AC

    Perfect!! HUGE HELP – thanks!

  163. Just had this problem, you were the first result in Google, lol. Cheers buddy!

  164. Hanna

    Thumbs up!

  165. Kathy

    Still Helping! THANKS!!!

  166. I’m glad your post came up first in the SERP’s. You saved me from pulling my own hair. 🙂

  167. Kiya Sharma

    Thanks Dude,

    You don’t know how how much time of mine you’ve saved.
    GBU !! xD

  168. edel macias

    Thanks you for the info!
    Still helping haha
    Much spam, such helpful

  169. Archana

    Thanks for the info!
    Still helping

  170. Amir

    Thank You. It is help us 😉 fckng excel 😉

  171. thanks a lot!!!It worked!!! in 2018 🙂

  172. asd

    thanks

  173. jamie

    Thanks for this so many years later!

    I am quite certain that I told Excel that I was looking for text files (not slky or skly or ksly or Excel or any other type of file). Yes, I chose from a selection that Excel presented me with. I knew I wanted txt files… I chose a text file… even had a .txt extenstion… I told Excel this after it asked me… and wha??? It wants to tell me it’s a slksdksyr file?

    How awful.

    If Microsoft has any hand in building the AI that is suppose to rule the world one day, at least we now know we can just write “ID” on the bullets we shoot at the droids that come to farm us. They will have no defense.

    • Just change the first line of your address and your first name to ID.

      They’ll never know who you are or where you live!

  174. Leslie

    NEWEST issue: what if the file already was saved and I am trying to open it when I get this SYLK error?
    I can’t get to the data to view it and fix it 🙁

    • Off the top of my head you could try opening it in a proper text editor like Sublime?

      Or open a new sheet and open it as a datasource?

  175. Bern Almazan

    Big help. Thanks a lot.
    Bern

  176. paddy

    Highlight of my weekend. Many thanks.

  177. EC

    Love it

  178. Ravish

    You save my day, Thanks you !!

  179. Mihai

    wow, I almost can’t believe the ID stuff…saved my day too. Thanks!

  180. :)

    Thank you sir. You are a GOD!

  181. Joachim David

    It helps again, yay!

  182. Connie

    OMG… Thanks so much!

  183. Steve

    What Connie says!

  184. Zoe

    September 2018 …. still helping

    I edited the csv in Notepad and changed the header row to have double quotes around all the headings, and it fixed the issue for my file. The quotes are not displayed when loaded in Excel and no warnings. Winning!
    i.e.
    “ID”,”Name”,”Email”

    • Yep, that’s another great way to fix the issue. Adding quotes means it’s just treated as a string and no preprocessing takes place. But like when people give you datasets with columns that have names with sql keywords like Select, from, where etc

  185. Ian

    Still helping…saved me many hours of troubleshooting…

  186. Satyendra Mishra

    Thanks a lot, you saved me many hours of troubleshooting.

  187. Mohammad Khan

    Thank you. Thank you. Thank you.

  188. shrinivas

    thanks

  189. Pierre Chesnier

    Can someone try to OPEN A SECOND TIME the file, after Excel gives you errors and opens a blank file ?
    Just, keep the file (excel) open and double clic the file again. What happens there ?

    Pierre C.

    NEVER GIVE UP

  190. izi

    Well, it is 11.14.2018 and I just encountered the same issue! Oy vey!

  191. Cesar Aquino

    Thank you a lot!!!

  192. Andriy

    thanks!

  193. newoutlaw

    Just save the file as a Unicode .txt file. Then rename it to csv and Bob’s your uncle.

  194. Sivasakthi Sivagnanam

    Thank you for everyone who honed into the issue being first cell cannot have text starting with “ID”. cheers folks.

  195. Kenneth Jims Quezon

    Still helping! March 14, 2019

  196. James

    Still helping! March 19, 2019

  197. Heidi

    still helping!!!

  198. Dave Khan

    This saved me. Fortunately, in my case, the use of “ID” as the first two characters in the CSV file was not a rigid requirement; I was able to change it a bit to get around the problem. But I’d have never known what the problem was without this post.

  199. Papa Stauth

    Energizer Bunny “Still helping” …

  200. Jesse Hefter

    Unbelievably helpful. All I had to so was place a Response.Write(“‘”); at the beginning of the file. Thanks so much!

  201. Jason Woolf

    I’ve copied Dave Khan’s Reply above as its a simple case of “Same Here”!

    This saved me. Fortunately, in my case, the use of “ID” as the first two characters in the CSV file was not a rigid requirement; I was able to change it a bit to get around the problem. But I’d have never known what the problem was without this post.

    Many Many Thanks for posting the solution

  202. Milz

    STILL HELPING “2019”+

  203. Jennifer L.

    STILL helping June 1, 2019! For real!

    Also the knowledge base link referenced seems to now be broken :(. Thanks, Microsoft!

  204. Zernk

    This is freaking insane! WTF is wrong with M$? This problem is so 1980’s. Thanks so much for the solution!

  205. Thanks a lot dear ,it worked.

  206. Thanks a lot man ,it really worked.

  207. Pernille

    Just another happy user of this brilliant finding!
    Thanks for putting it out there 🙂

  208. Very nice site,keep on posting.

  209. Thanks for sharing such a nice post,keep up the good work.

  210. It really worked for me,keep up the good work.

  211. It really worked for me,keep up the good work.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Powered by WordPress & Theme by Anders Norén