Skip to content

Commit 6f5c39a

Browse files
committed
Docs format update, added reference to PAPA parse
1 parent 1b59853 commit 6f5c39a

31 files changed

+87
-45
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
VBA CSV interface is a class module developed to accomplish the data exchange task between VBA arrays and CSV files at high speed. Projects from [@sdkn104](https://github.com/sdkn104/VBA-CSV) and [@Senipah](https://github.com/Senipah/VBA-Better-Array), both on Github, were used for comparative performance purposes.
88

99
The parser is compatible with those CSV files compliant with the RFC-4180 standard, but add some useful features like:
10-
* In-line comments (with a user-defined character).
10+
* In-line comments (with a user-defined character). See [Papa Parse](https://www.papaparse.com/) project.
1111
* Skip blanks lines and empty ones.
1212
* User-defined escape character (option not available in _Power Query for Excel 2019_ and with some inconsistences when use the _From Text(Legacy)_ wizard)[[1]](#1).
1313

docs/api/enumerations/escapetype.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ Provides a list of constants for use to configure the char used as escape one.
2727

2828
*variable* = `EscapeType`.*Constant*
2929

30-
>📝**Note:**
30+
>📝**Note**
31+
>{: .text-grey-dk-300 .bg-green-000 }
3132
>The `EscapeType.NullChar` value is used with the`QuotationMode.All` setting to indicates the CSV file does not use any escape char in its whole length. This values combination conduces the CSV file to be parse/write assuming the `FieldsDelimiter` property is enough for the import/export operations.
3233
>
3334
>In the case the `FieldsDelimiter` property is not enough for successfully done the import/export operations, the `EscapeType.DoubleQuotes` value would be used for parse/write an CSV having fields to be escaped with double quote and the `EscapeType.Apostrophe` values for parse/write an CSV having fields to be escaped with the apostrophe, using the `QuotationMode.Critical` mode.

docs/api/enumerations/quotationmode.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ Provides a list of constants to configure the CSV parsing/writing operation beha
2626

2727
*variable* = `QuotationMode`.*Constant*
2828

29-
>📝**Note:**
29+
>📝**Note**
30+
>{: .text-grey-dk-300 .bg-green-000 }
3031
>The `QuotationMode.Critical` value, default one, is used to indicates the CSV file must use escape char only in fields having special char. The `QuotationMode.All` value most be used for those CSV files in wich all its fields will be escaped with the escape char given with the `EscapeChar` property.
3132
{: .text-grey-dk-300 .bg-grey-lt-000 }
3233

docs/api/methods/dumptoarray.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ The required *OutPutArray* argument is an identifier specifying a dynamic `Strin
2525

2626
_None_
2727

28-
>📝**Note:**
28+
>📝**Note**
29+
>{: .text-grey-dk-300 .bg-green-000 }
2930
>Before dump data, is recommended to make a `ImportFromCSV` or `ImportFromCSVstring` method call. The *OutPutArray* parameter must be declared as dynamic `String` array. If user forget to do this, an error will occur.
3031
{: .text-grey-dk-300 .bg-grey-lt-000 }
3132

docs/api/methods/dumptosheet.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ Dumps the data from the current instance to an Excel WorkSheet.
4949

5050
_None_
5151

52-
>📝**Note:**
52+
>📝**Note**
53+
>{: .text-grey-dk-300 .bg-green-000 }
5354
>Before dump data, is recommended to make a `ImportFromCSV` or `ImportFromCSVstring` method call.
5455
{: .text-grey-dk-300 .bg-grey-lt-000 }
5556

docs/api/methods/exporttocsv.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ The required *csvArray* argument is an identifier specifying a `Variant` array v
2525

2626
_None_
2727

28-
>📝**Note:**
28+
>📝**Note**
29+
>{: .text-grey-dk-300 .bg-green-000 }
2930
>Before invoke the `ExportToCSV` method, the user must to open a connection to the CSV file. The *csvArray* parameter must be declared as `Variant` array. Passing a variable that isn't an array will cause an error and the operation aborts.
3031
{: .text-grey-dk-300 .bg-grey-lt-000 }
3132

docs/api/methods/getdatafromcsv.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ The required *csvPathAndFilename* argument is an identifier specifying a `String
2525

2626
*Type*: `String`
2727

28-
>📝**Note:**
28+
>📝**Note**
29+
>{: .text-grey-dk-300 .bg-green-000 }
2930
>The *csvPathAndFilename* parameter must be the full path to the target CSV file, this means, the parameter holds the folder path, the file name and the ".csv" extension.
3031
{: .text-grey-dk-300 .bg-grey-lt-000 }
3132

docs/api/methods/importfromcsv.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ Imports a CSV file's content to an array.
4242

4343
_None_
4444

45-
>📝**Note:**
45+
>📝**Note**
46+
>{: .text-grey-dk-300 .bg-green-000 }
4647
>If the *HeadersOmission* parameter is set to `True`, the CSV file headers, first record, will be ignored by the parser only when the `StartingRecord` property is set to 1.
4748
>The *PassControlToOS* parameter allows user to pass control to the operating system. Control is returned after the operating system has finished processing the events in its queue.
4849
{: .text-grey-dk-300 .bg-grey-lt-000 }
@@ -56,7 +57,8 @@ See also
5657

5758
User can set `CommentLineIndicator` for those CSV files having a combination of empties lines, blanks lines or commented ones for parse the file ONLY when the parser is working on `QuotationMode.Critical` mode. In that mode, the cited lines are simply skipped, leaving no empty values between records separated by this kind of lines. In other words, if the CSV file holds a record and then some special lines (blank, empty or commented) and then another record, the second record will be saved contiguous to the first record ignoring the lines between both.
5859

59-
>⚠️**Caution:**
60+
>⚠️**Caution**
61+
>{: .text-grey-dk-300 .bg-green-000 }
6062
>Before invoke the `ImportFromCSV` method, the user must to open a connection to the CSV file. If the CSV file has no data, this is the file is an empty one, the `ImportFromCSV` method returns an empty array, that is, an array bounded from 0 to -1 and holding no elements and no data.
6163
{: .text-grey-dk-300 .bg-yellow-000 }
6264

docs/api/methods/importfromcsvstring.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ Parses a string and save its CSV data to an array.
4646

4747
_None_
4848

49-
>📝**Note:**
49+
>📝**Note**
50+
>{: .text-grey-dk-300 .bg-green-000 }
5051
>If the *HeadersOmission* parameter is set to `True`, the CSV file headers, first record, will be ignored by the parser only when the `StartingRecord` property is set to 1.
5152
>The *PassControlToOS* parameter allows user to pass control to the operating system. Control is returned after the operating system has finished processing the events in its queue.
5253
{: .text-grey-dk-300 .bg-grey-lt-000 }
@@ -60,7 +61,8 @@ See also
6061

6162
User can set `CommentLineIndicator` for those CSV files having a combination of empties lines, blanks lines or commented ones for parse the file ONLY when the parser is working on `QuotationMode.Critical` mode. In that mode, the cited lines are simply skipped, leaving no empty values between records separated by this kind of lines. In other words, if the CSV file holds a record and then some special lines (blank, empty or commented) and then another record, the second record will be saved contiguous to the first record ignoring the lines between both.
6263

63-
>⚠️**Caution:**
64+
>⚠️**Caution**
65+
>{: .text-grey-dk-300 .bg-green-000 }
6466
>If the CSV file has no data, this is the file is an empty one, the `ImportFromCSVstring` method returns an empty array, that is, an array bounded from 0 to -1 and holding no elements and no data.
6567
{: .text-grey-dk-300 .bg-yellow-000 }
6668

docs/api/methods/openconnection.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,13 @@ Loads a CSV file on memory for data Input/Output operations.
4242

4343
_None_
4444

45-
>⚠️**Caution:**
45+
>⚠️**Caution**
46+
>{: .text-grey-dk-300 .bg-green-000 }
4647
>The `OpenConnection` method don't rejects any kind of file extension, user need to ensure the target file has a name ending in `.csv` or `.txt`.
4748
{: .text-grey-dk-300 .bg-yellow-000 }
4849

49-
>📝**Note:**
50+
>📝**Note**
51+
>{: .text-grey-dk-300 .bg-green-000 }
5052
>The `OpenConnection` method is the preamble to the `ImportFromCSV` and `ExportToCSV` methods, this means each call to the citated methods must be preceded by a `OpenConnection` method call.
5153
>After call the `OpenConnection` method is possible to check if the instance is bind to the CSV file, for which is only needed to read the current instance `Connected` property.
5254
{: .text-grey-dk-300 .bg-grey-lt-000 }

0 commit comments

Comments
 (0)