ObjCSV Library v0.3
Written using AutoHotkey_L v1.1.09.03+ (http://l.autohotkey.net/)
By JnLlnd on AHK forum
A set of AutoHotkey_L (AHK) functions to load from CSV files, sort, display and save collections of records using the Object data type. Files can be read and saved in any delimited format (CSV, semi-colon, tab delimited, single-line or multi-line, etc.). Collections can also be displayed, edited and read in Gui ListView objects. For more info on CSV files, see http://en.wikipedia....eparated_values.
Even if you don't know much about AHK objects, simply using these functions will help to:
- Transform a tab or semi-colon delimited CSV file to a straight coma-delimited file (any single character delimited is supported).
- Load a CSV file with multi-line fields (for example, Notes fields in a Google Contact or Outlook tasks export) and save it in a single line CSV file (with the end-of-line replacement character of your choice) that can be imported easily in Excel (see demo here).
- Export the data from a CSV file to various formats: fixed-width, HTML or XML.
- Load a file to object to run any scripted manipulation on the content of the file with the ease and safety of AHK objets.
- Add/change CSV header names, change the order of fields or remove fields in a CSV file programatically.
- Display the file content in a ListView for further viewing or editing (multiple Gui and ListView controls are supported).
- Sort the data on any field combination before loading to the ListView or saving to a CSV file.
- Save all or selected rows of a ListView to a CSV file.
- Save to a file with or without header, with the fields delimiter and encapsulator of your choice.
- Home of this library is on GitHub: https://github.com/JnLlnd/ObjCSV
- The most up-to-date version of this AHK file on GitHub: https://raw.github.c.../Lib/ObjCSV.ahk
- Online ObjCSV Library Help: http://jeanlalonde.c...CSV/ObjCSV-doc/
- Demo and tutorail on how to use this library can be found here:
Copy this script in a file named ObjCSV.ahk and save this file in one of these \Lib folders:
[path to the currently running AutoHotkey_L.exe]\Lib\ (AutoHotKey_L can be downloaded here: http://l.autohotkey.net/ )
You can use the functions in this library by calling ObjCSV_FunctionName. No #Include required!
0.3.0 2013-10-07 Removed strRecordDelimiter, strOmitChars and strEndOfLine parameters. Replaced by `r`n (CR-LF).
Compatibility breaker. Review functions calls for ObjCSV_CSV2Collection, ObjCSV_Collection2CSV,
ObjCSV_Collection2Fixed, ObjCSV_Collection2HTML, ObjCSV_Collection2XML, ObjCSV_Format4CSV
0.2.5 2013-09-26 Optimize large variables management in save functions (2CSV, 2Fixed, 2HTML and 2XML), optimize progress bars refresh rates
0.2.2 2013-09-15 Export to fixed-width (ObjCSV_Collection2Fixed), HTML (ObjCSV_Collection2HTML) and XML (ObjCSV_Collection2XML)
0.1.3 2013-09-08 Multi-line replacement character at load time in ObjCSV_CSV2Collection
0.1.2 2013-09-05 Standardize boolean parameters to 0/1 (not True/False) and without double-quotes
0.1.1 2013-08-26 First release
The most up-to-date version of this AHK file can be found here: