7 7 Votes

Excel Error when opening CSV File: File was detected as SYLK File!

Question by Guest | 19/02/2013 at 19:11

When opening a normal CSV-File with Microsoft Excel, a strange problem occurs.

First, I get the following error message:

The file you are trying to open is in a different format than 
specified by the file extension. Verify that the file is not 
corrupted and is from a trusted source before opening the file. 
Do you want to open the file now?

Yes | No | Help

After clicking on "Yes", the next error occurs:

Cannot read record 1.
Continue reporting each error?

Yes | No | Cancel

I click on "Yes" again, and I get the third error message:

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

OK | Cancel

Only after clicking "OK" in this third error message, my file is opened and ironically, it is displayed correctly.

As far as I can judge, there are no other problems with the file. Additionally, OpenOffice can display the contents properly. So what is it?

Unfortunately, I have to pass this CSV spreadsheet on to a customer and I would not like that every time he gets this error messages. Can someone help me with that issue?

ReplyPositiveNegative

Progger99

Show Profile | Message
Avatar
30Best Answer
32 Votes

This error occurs, whenever the first two characters of a CSV file are "ID".

To prevent this error, you have to ensure that your CSV file is not starting with the string "ID". For example, writing "ID" in lowercase letters "id" is a workaround. Alternatively, you can put an apostrophe ' in front of the "ID".
22/02/2013 at 22:35

ReplyPositive Negative
Reply

Related Topics

PHPExcel: Leading Zeros
Question | 1 Answer

Important Note

Please note: The contributions published on askingbox.com are contributions of users and should not substitute professional advice. They are not verified by independents and do not necessarily reflect the opinion of askingbox.com. Learn more.

Participate

Ask your own question or write your own articles on askingbox.com. How to do.