Releases: ws-garcia/VBA-CSV-interface
Releases · ws-garcia/VBA-CSV-interface
CSV Interface v4.3.2
Bug fixes
- CSVTextStream: subfolders were not managed correctly.
- CSVArrayList: Add2 method was broken.
CSV Interface v4.3.1
Improvements
- Stream reader: smarter work with text files containing a mixture of line ending characters.
- Filter: faster execution.
Bug fixes
- Delimiter guesser: can't guess delimiters when forcing streams to return
vbLfas EOL char. - Dedupe: broken function when calling from
CSVInterfaceclass module.
CSV Interface v4.3.0
This version includes an important code refactoring of several members of the library, as well as some improvements that allow to outline the tool as a solid solution for data management.
Improvements
- Key related records: users can now use keys to segregate records as they are stored when the
keyTreeproperty is set toTrue. For example, under a key "fruits" you can store the records "lemon", "pear" and for a key "tools" you can store "hammer" and "chainsaw"; the user can request the segregated records at any time with theGetIndexedItemmethod by specifying a key. - Faster deduplication: the execution time of the "Dedupe" method is 40% less.
- Use headers titles for computations:
Filter,ReduceandInsertFieldmethods now supports headers titles (also with white spaces) as variables. - Calculated fields: the new
InsertFieldmethod unleashes the possibility to use complex expressions to calculate values and insert them as a new field/column in the data tables. For example the following instruction adds a new field called "Taxes" in the ninth position which is defined as 18% of the total profit in each record, giving the VBA "Currency" format to the computation made: :.InsertField(8, "Taxes", True, "FORMAT(Total Revenue * PERCENT(18);'Currency')"). - Easy data storage: copy data from arrays of arraylist with the flexible and robust
Add2method and theitemsproperty. Define and share data from scratch with theFromStringandToStringmethods.
Members changes
CSVinterface
-
InsertFieldnow has aFormulaparameter to allow insertion of calculated fields.
CSVarrayList
- Added:
Dedupe,FromString,InsertField,MergeFields,RearrangeFields,RemoveField,ShiftField,ShiftRecord,SortByField,SortKeys,SplitField, andToStringmethods. - Added:
isSorted,keyTree,lastSortedIndexproperties. - Optimized:
Add2andDedupemethods,itemsproperty. - Bug fixed: parser unable to properly get the order of the fields given by the user. Affected methods:
Dedupe,LeftJoin,RightJoin,InnerJoin. - Bug fixed: unexpected behavior. Affected method:
SortByField
CSVexpression
- Improvement: more than 60 string, mathematical, logical, date-time and financial built-in functions
- Bug fixed: boolean negation prevents recognizing variables. Affected method:
Eval. - Bug fixed: function parsing was broken. Affected method:
Create.
CSV Interface v4.2.1
Members changes
CSVarrayList
- Bug fixed: Joins did not retrieve headers.
CSV Interface v4.2.0
This new version includes many useful features that had not been covered and suggested by some enthusiasts (see this and this other subreddit post). Now VBA CSV Interface is shaping up to be a much more powerful tool when working with CSV files.
Improvements
- Like SQL joins: left, Right and Inner joins for tables, flavored for VBA users. CSV Interface becomes the only VBA library that supports this feature.
- Group method: this will allow users to accumulate with COUNT, MIN, MAX, SUM and AVG operations.
- Reduce method: to reduce records by executing functions over fields through records.
- Sorting large files: useful to allow sorting a CSV file on disk without overloading memory, currently this feature is very required but supported by few libraries.
Members changes
CSVinterface
-
CSVsubsetSplitnow accepts a list of fields to split on and output to a path ending in "-WorkDir". - Added:
SortOnDiskmethod. - Added:
BlockAutoFormatparameter toDumpToSheetmethod in order to prevent CSV injection. - Added:
AfterExportRecord,AfterImportRecord,AfterLoadStream,AfterSortandAfterWriteStreamevents. - Bug fixed: Unable to detect opened workbooks.
- Bug fixed: Export procedure adding extra lines to output CSV files
CSVarrayList
- Added: error handling to
Filtermethod. - Added:
LeftJoin,RightJoin,InnerJoin,Group,Reduce,AddIndexedItem,GetIndexedItem,RemoveIndexedItem,KeyExistandKeyIndexmethods. - Added:
Indexingproperty. - Optimized:
RemoveRange,RemoveAtandInsertmethod. - Bug fixed:
Sortmethod. - Deprecated:
IntroSortsorting method.
CSVexpression
- Optimized: performance of evaluations on numerical expressions.
- Bug fixed: truncation of strings preventing assigment to string variables.
CSV Interface v4.1.3
Improvements:
- Added error handling to
Filterfunction
CSV Interface v4.1.2
Bugs fixed:
- Infinite loop when intercepting operators in
Filtermethod.
CSV Interface v4.1.1
Improvements:
- More advanced fitering capabilities. Expressions such as
f1='Asia' & f9>20 & f9<=50 & f8 $ '10/*/2014'will use VBA's versatile LIKE operator ($) to perform powerful querie over CSV data.
Deprecated members
Filter2method: this work can be done with theFiltermethod.
CSV Interface v4.1.0
Improvements:
- Integration with
VBAexpressionscore modules.
Deprecated members
GetCSVsubsetmethod: this work can be done with theFiltermethod.
CSV Interface v4.0.0
Bugs fixed:
- The
GetRecordmethod was not able to discard unwanted fields. DumpToSheetmethod cannot rename the attached sheet if it does not exist before.
Improvements:
- Insert and remove fields and records.
- Data filtering.
- Rearrange, merge, split fields.
- Shift fields and records.
- Dedupe CSV records.
- The user can now sort data based on multiple columns with the IntroSort, QuickSort, HeapSort and Merge algorithms via the
Sortmethod in a intuitive way: use-1to indicate a descending sort on column 1. Also data can be sorted by fields, Microssoft calls it left to right sort, that means that all records will be rearranged together with the record, typically header, chosen as key. - Optimized
DumpToSheetandExportToCSVmethods. - Parser and writer accept Unix DSV files, e.g.,
\,will escape the,when used as a field delimiter. - I/O operations on UTF-8 CSV files, commonly found on web sites, are now supported via streams.
- Refactoring: Added
CSVSnifferclass module. - Refactoring: Added
CSVdialectclass module (field delimiter, record delimiter and escape token are managed in it and used inCSVparserConfigmodule). - Refactoring: Added
EscapeStyleenumeration. - Refactoring: Added
escapeModeproperty. - Refactoring: Added
SortingAlgorithmsenumeration. - Refactoring: Added the
utf8EncodedFileproperty. - The delimiter sniffer has a powerful mix of simple scoring due to the field data type and robust statistical scoring in order to check the uniformity of data in fields and records. Only one row of data can instruct the dialect, however, if the CSV file has headers the disambiguation rate increases by 298%! The sniffer now returns a
CSVdialectobject with the guessed delimiters.
Member changes
- Renamed method:
GuessDelimiters-->SniffDelimiters - Renamed method:
CSVdatasetSplit-->CSVsubsetSplit - Renamed property:
turnStreamRecDelimiterToLF-->multiEndOfLineCSV - Renamed property:
rectangularResults-->uniformLengthRecords - Renamed enumeration:
EscapeTokens-->QuoteTokens - Renamed class module:
parserConfig-->CSVparserConfig - Renamed class module:
ECPArrayList-->CSVArrayList - Renamed class module:
ECPTextStream-->CSVTextStream
Deprecated members
unixEscapeMechanismproperty.
Documentation:
- Added an extensive set of details for each module of the CSV interface class.