Posts

Showing posts with the label csv

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'. ...

Coldfusion - Using ListFind and Split to get empty elements in a list

I am working with a lot of data import modules in ColdFusion and there are a lot of issues to handle while doing the import process. The data uploaded will be of different format, different delimiters, empty or null values etc. etc. Here, I am describing a problem where the delimiter is tab and the first element is null. I had to check whether the first element is null. I tried using ListGetAt(stringVariable,1,Chr(9)). Now, what this returned was the first non-empty element and not possible to check whether the first element was null.