Saturday, December 10, 2011

CSV and SYLK file.

We used to export data in the form of .csv file that is one of the easiest formats available. A .csv file can be opened in even Notepad and if it is opened in Microsoft Excel, you can perform calculation with the numbers also.
When you open a certain .csv file, Microsoft Excel may show an error that the file is a SYLK file and confirm to open it. Once you confirm it will show error that 'SYLK: File format is not valid'.
If you try to open the same file in Notepad or Wordpad you will not see any issue with the data.
The problem actually lies with Microsoft Excel. If the first two characters of the file are the uppercase letters "I" and "D", then MS Excel will consider the file as SYLK file and if you try to open it with MS Excel it will show error as the file is not actually an SYLK file.

Solution:
Open the file in notepad and change the first two characters of the file to lower case, if they are I and D. So, 'ID' will change to 'id'.

Reference: http://support.microsoft.com/kb/3236263

Wednesday, December 7, 2011