( New page needs more content )
Creating, Parsing, Importing, and Exporting CSV files
It's tempting to lump CSV files and Excel together but this delimited file format is used by many other applications as well. Almost every MV developer will be asked to import or export a CSV file in his/her career.
Creating CSV files
A CSV file is commonly either comma-delimited or tab-delimited. There actually is no official spec for CSV files, what gets quoted, how quotes or carriage returns are embedded in an element, etc. There are only accepted standards.
Add references to CSV creation code/techniques here
Parsing CSV files
To parse from a CSV file to a dimensioned or dynamic array, a few utilities are available - see each one and feel free to comment here on quality, suitability, etc.
Importing and Exporting CSV files
All MV environments support an interface to the host file system. With D3 this is an OSFI DOS: reference with a path. In U2 this would be a type 1 or type 19 file. In other platforms one would use a DIRECTORY file. The easiest way to import or export CSV, like any text file, is simply to open the directory containing (or to contain) the file using your MV-specific interface, then just read/write the item like any other.
From there most people wonder how they get that data into Excel (or another application), or how they get data from Excel (or another application into CSV in the first place. There are innumerable tools for import/export of CSV with various products. Many products will open a CSV natively, or save CSV as an option. In other cases conversion utilities are available. See this google link for Excel to CSV tools, and use similar queries to find something that suits your needs. A freeware tool for exporting multiple Excel spreadsheets (tabs) from a workbook is provided at http://Nebula-RnD.com/freeware/.
Tags: excel google docs openoffice calc csv comma-delimited tab-delimited spreadsheet worksheet