Library for reading/writing files in CSV format.
Files in CSV (comma separated values) format can be imported and exported
by most spreadsheed and database applications.
Author: Michael Hanus
Version: September 2004
| Exported names: |
Functions:
readCSV
| readCSVFile
| readCSVFileWithDelims
| readCSVWithDelims
| showCSV
| writeCSVFile
| Summary of exported functions: |
|
||
|
||
|
||
|
||
|
||
|
| Imported modules: |
| Exported datatypes: |
| Exported functions: |
:: String -> [[String]] -> IO ()
Writes a list of records (where each record is a list of strings) into a file in CSV format.
Example call: (writeCSVFile fname rows)
fname
- the name of the result file (with standard suffix ".csv")
rows
- the list of rows
:: [[String]] -> String
Shows a list of records (where each record is a list of strings) as a string in CSV format.
:: String -> IO [[String]]
Reads a file in CSV format and returns the list of records (where each record is a list of strings).
Example call: (readCSVFile fname)
fname
- the name of the result file (with standard suffix ".csv")
:: String -> String -> IO [[String]]
Reads a file in CSV format and returns the list of records (where each record is a list of strings).
Example call: (readCSVFileWithDelims delims fname)
delims
- the list of characters considered as delimiters
fname
- the name of the result file (with standard suffix ".csv")
:: String -> [[String]]
Reads a string in CSV format and returns the list of records (where each record is a list of strings).
Example call: (readCSV str)
str
- the string in CSV format
:: String -> String -> [[String]]
Reads a string in CSV format and returns the list of records (where each record is a list of strings).
Example call: (readCSVWithDelims delims str)
delims
- the list of characters considered as delimiters
str
- the string in CSV format