Excel Misinterpreting CSV as SYLK file.
When opening a CSV file in Excel where the first field is "ID", Excel gives a dialog saying the extension does not match the file type (Excel assuming the file type to be SYLK). I have had to make a change to my codebase to change "ID" to "_ID" specifically for users who utilize Excel. I would appreciate a fix ASAP.
Hello, here is the VBA solution: Simply turn off the alerts and it will power right through the popups 8)
Application.DisplayAlerts = False
Workbooks.Open Filename:=folderName & "\" & myfile, Format:=6, Delimiter:="|"
Application.DisplayAlerts = True
I hope this helps those of you who have been pulling your hair out over this!
Please provide an option to bypass this warning in VBA.
Fix this !! Microsoft is just a f.. bug factory !
Yes, please fix. To ASSUME a file is of a certain type simply because of the leading data is CLEARLY incorrect. Excel is uselessly forcing users to change their data, which is something an application should never do unless there is a compelling reason (this is not one, it is simply a programming error).
If I open the file in not pad and change the ID to id or ‘ID, it works. This is a pain because I export the file from a system and don’t usually have the ability to say how I want it saved. If I then have to make changes to the file and reimport it, I need to make sure I undo the changes to the first record. It would be nice if there was a fix by Microsoft.
João Sousa commented
Has this been fixed in a recent update? Doesn't seem to be happening anymore, can anyone confirm?
Please fix the issue!
Sean Bradley commented
Please fix this bug. The error message is misleading and causing a great deal of confusion about the files being corrupted when they aren't.
Please fix the issue!
H H commented
Absolutely! I am sick of that error message. I use so many CSVs with first column ID that I regret upgrading.
Richard Noakes commented
Please fix this Microsoft!
If a file is a CSV let Excel open it as a CSV, everytime, regardless of the contents of the file. Or at the very least, give the user an option to open CSV or SYLK, not simply an error message.
As stated elsewhere, many applications export CSVs where the first characters are "ID".
Please, this should be a no-brainer!
Andrew K. commented
This also being a huge problem when viewing SQL exports, as the first field in a database is usually, you guessed it, "ID".