Support freeware! |
Leave a comment, a suggestion or ask a question! |
ObjCSV AutoHotkey Library
AutoHotkey_L (AHK) functions to load from CSV files, sort, display and save collections of records using the Object data type.
- Home of this library is on GitHub
- The most up-to-date version of this AHK file on GitHub
- Online ObjCSV Library Help
- Topic about this library on AutoHotkey forum
- Topic about this library on AutoHotkey forum (closed topic on old AHK forum)
This is very impressive! Have you considered adding a function to remove duplicates? And/Or flag duplicates? I'll try and figure it out however I'm new to Objects/Arrays (and programming for that matter) and am mostly faking my way through AutoHotKey code.
I'm very grateful for your sharing of these libraries!
Regards,
Joe Glines
Thank you Joe for your comment. Much appreciated :-)
Actually, I'm not planning it. But this is the kind of script that can be easily written using the ObjCSV library, providing you climbed the AHK learning curve...
These tutorial can help you getting started with this library and with objects:
http://www.autohotkey.com/board/topic/96619-objcsv-library-tutorial-basic/
http://www.autohotkey.com/board/topic/97147-parsing-csv-files-with-multi-line-fields/
@Barry Potter: I moved your comment to the CSV Buddy page:
http://code.jeanlalonde.ca/csvbuddy/#comment-9943
Thank you.
The library has been updated to v0.5 to support file encoding other that ANSI.
v0.5.0 2016-05-23
- Addition of file encoding optional parameter strFileEncoding to ObjCSV_CSV2Collection, ObjCSV_Collection2CSV, ObjCSV_Collection2Fixed, ObjCSV_Collection2HTML and ObjCSV_Collection2XML.
- In ObjCSV_CSV2Collection if the strFileEncoding ByRef parameter is empty, it is returned with the detected file encoding. If strFileEncoding is a literal value or a filled variable, the parameter is used to set reading encoding.
- File encoding supported: ANSI (default), UTF-8, UTF-16, UTF-8-RAW (No BOM), UTF-16-RAW (No BOM) or CPnnnn (nnnn being a code page numeric identifier
- See https://autohotkey.com/docs/commands/FileEncoding.htm
This version of the library is used in CSVBuddy v1.3+.
Hi! Just an update for this reference page about ObjCSV. The library has been updated a few times since my last post here:
0.5.7 2016-12-20 In ObjCSV_CSV2Collection, if blnHeader is false (0) and strFieldNames is empty, strFieldNames returns the "C" field names created by the function.
0.5.6 2016-10-20 Stop trimming data value read from CSV file. Addition of blnTrim parameter to ObjCSV_ReturnDSVObjectArray (true by default for backward compatibility).
0.5.5 2016-08-28 Optional parameter strEol to ObjCSV_Collection2CSV and ObjCSV_Collection2Fixed now empty by default. If not provided, end-of-lines character(s) are detected in value to replace. The first end-of-lines character(s) found is used for remaining fields and records.
0.5.4 2016-08-23 Add optional parameter strEol to ObjCSV_Collection2CSV and ObjCSV_Collection2Fixed to set end-of-line character(s) in fields when line-breaks are replaced.
0.5.3 2016-08-21 Fix bug with blnAlwaysEncapsulate in ObjCSV_Collection2CSV.
0.5.2 2016-07-24 Add an option to ObjCSV_Collection2CSV and blnAlwaysEncapsulate functions to force encapsulation of all values.
0.5.1 2016-06-06 In ObjCSV_CSV2Collection if the ByRef parameter is empty, the file encoding is returned only for UTF-8 or UTF-16 encoded files (no BOM) because other types (ANSI or UTF-n-RAW) files cannot be differentiated by the AHK engine.
Hi! Another update for this reference page about ObjCSV. The library has been updated two times since my last post here:
0.5.9 2017-07-20 In ObjCSV_CSV2Collection, reverse change in v0.4.1 to import non-standard CSV files created by XL causing issue (stripping "=") in encapsulated fields with containing "...=""..."
0.5.8 2016-12-22 In ObjCSV_CSV2Collection, fix bug when creating "C" names header if blnHeader is false (0) and strFieldNames is empty.
v0.5.9 solves an issue that I consider serious enough to recommend users to update their library if they process files with HTML or XML multi-line content.
Sir
Can ObjCsv be ran from Ahk version 2
Gary Robinson
Hi Gary. No. I did not make the switch to v2 yet. Someone else would have to adapt it.