Skip to content

Commit 9dd1e57

Browse files
authored
Merge pull request #13 from ws-garcia/VBA-CSV-Interface-v2.0.0
Updates
2 parents ebe8ea7 + d65936b commit 9dd1e57

16 files changed

+467
-189
lines changed

docs/api/methods/dumptoarray.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ Dumps the data from the current instance to an array.
1919

2020
### Parameters
2121

22-
The required *OutPutArray* argument is an identifier specifying a dynamic `String` array variable.
22+
The required *OutPutArray* argument is an identifier specifying a dynamic `String` type array variable.
2323

2424
### Return value
2525

2626
_None_
2727

2828
>📝**Note**
2929
>{: .text-grey-lt-000 .bg-green-000 }
30-
>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 can occur.
30+
>Before dump data, is recommended to make a `ImportFromCSV` or `ImportFromCSVstring` method call. The *OutPutArray* parameter must be declared as dynamic `String` type array. If user forget to do this, an error can occur.
3131
{: .text-grey-dk-300 .bg-grey-lt-000 }
3232

3333
See also
@@ -39,6 +39,6 @@ See also
3939

4040
The `DumpToArray` method make a copy of all the data stored in the current instance. The data is returned in the *OutPutArray* parameter for avoid additional data copies in the internals.
4141

42-
The dumped data will be erased from memory, in other words, the current instance doesn't hold the CSV read data any more. In the same way, the `DumpToArray` method returns an empty `String` array for subsequent calls not preceded by `ImportFromCSV` or or `ImportFromCSVstring` method call.
42+
The dumped data will be successively erased from memory, in other words, the current instance will doesn't hold the read CSV data any more. In the same way, the `DumpToArray` method doesn’t perform any modifications to the *OutPutArray* array for subsequent calls not preceded by one `ImportFromCSV` or `ImportFromCSVstring` method call.
4343

44-
[Back to Methods overview](https://ws-garcia.github.io/VBA-CSV-interface/api/methods/)
44+
[Back to Methods overview](https://ws-garcia.github.io/VBA-CSV-interface/api/methods/)
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
title: DumpToJaggedArray
3+
parent: Methods
4+
grand_parent: API
5+
nav_order: 2
6+
---
7+
8+
# DumpToJaggedArray
9+
{: .d-inline-block }
10+
11+
New
12+
{: .label .label-purple }
13+
14+
Dumps the data from the current instance to a jagged array.
15+
{: .fs-6 .fw-300 }
16+
17+
---
18+
19+
## Syntax
20+
21+
*expression*.`DumpToJaggedArray`*(OutPutArray)*
22+
23+
### Parameters
24+
25+
The required *OutPutArray* argument is an identifier specifying a dynamic `Variant` type array variable.
26+
27+
### Return value
28+
29+
_None_
30+
31+
>📝**Note**
32+
>{: .text-grey-lt-000 .bg-green-000 }
33+
>Before dump data, is recommended to make a `ImportFromCSV` or `ImportFromCSVstring` method call. The *OutPutArray* parameter must be declared as dynamic `Variant` type array. If user forget to do this, an error can occur.
34+
{: .text-grey-dk-300 .bg-grey-lt-000 }
35+
36+
See also
37+
: [ImportFromCSV method](https://ws-garcia.github.io/VBA-CSV-interface/api/methods/importfromcsv.html), [ImportFromCSVstring method](https://ws-garcia.github.io/VBA-CSV-interface/api/methods/importfromcsvstring.html).
38+
39+
---
40+
41+
## Behavior
42+
43+
The `DumpToJaggedArray` method make a copy of all the data stored in the current instance. The data is returned in the *OutPutArray* parameter for avoid additional data copies in the internals.
44+
45+
The dumped data will be successively erased from memory, in other words, the current instance will doesn't hold the read CSV data any more. In the same way, the `DumpToJaggedArray` method doesn’t perform any modifications to the *OutPutArray* array for subsequent calls not preceded by one `ImportFromCSV` or `ImportFromCSVstring` method call.
46+
47+
>📝**Note**
48+
>{: .text-grey-lt-000 .bg-green-000 }
49+
>The *OutPutArray* argument will contain a set of `String` type arrays. To access to an individual element user must use something like **_expression(i)(j)_**, where **_i_** denotes an index in the main array and **_j_** denotes an index in the child array.
50+
{: .text-grey-dk-300 .bg-grey-lt-000 }
51+
52+
[Back to Methods overview](https://ws-garcia.github.io/VBA-CSV-interface/api/methods/)

docs/api/methods/dumptosheet.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,11 @@
22
title: DumpToSheet
33
parent: Methods
44
grand_parent: API
5-
nav_order: 2
5+
nav_order: 3
66
---
77

88
# DumpToSheet
9-
{: .d-inline-block }
10-
11-
New
12-
{: .label .label-purple }
9+
{: .fs-9 }
1310

1411
Dumps the data from the current instance to an Excel WorkSheet.
1512
{: .fs-6 .fw-300 }
@@ -63,4 +60,5 @@ See also
6360

6461
When the *WBookName* parameter is omitted the data is dumped into the Workbook that holds the CSV interface's *VBAProject*. Omitting the *SheetName* parameter adds a new Worksheet to the desired Workbook. Also, if the *RngName* parameter is omitted the data will dumped starting on the "A1" named cell in the desired Worksheet.
6562

63+
The dumped data will be successively erased from memory, in other words, the current instance will doesn't hold the read CSV data any more. In the same way, the `DumpToSheet` method doesn’t perform any action for subsequent calls not preceded by one `ImportFromCSV` or `ImportFromCSVstring` method call.
6664
[Back to Methods overview](https://ws-garcia.github.io/VBA-CSV-interface/api/methods/)

docs/api/methods/exporttocsv.md

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: ExportToCSV
33
parent: Methods
44
grand_parent: API
5-
nav_order: 3
5+
nav_order: 4
66
---
77

88
# ExportToCSV
@@ -15,11 +15,28 @@ Exports an array's content to a CSV file.
1515

1616
## Syntax
1717

18-
*expression*.`ExportToCSV`*(csvArray)*
18+
*expression*.`ExportToCSV`*(csvArray, {PassControlToOS:= `True`})*
1919

2020
### Parameters
2121

22-
The required *csvArray* argument is an identifier specifying a `Variant` array variable.
22+
<table>
23+
<thead>
24+
<tr>
25+
<th style="text-align: left;">Part</th>
26+
<th style="text-align: left;">Description</th>
27+
</tr>
28+
</thead>
29+
<tbody>
30+
<tr>
31+
<td style="text-align: left;"><em>csvArray</em></td>
32+
<td style="text-align: left;">Required. Identifier specifying a <code>Variant</code> array variable.</td>
33+
</tr>
34+
<tr>
35+
<td style="text-align: left;"><em>PassControlToOS</em></td>
36+
<td style="text-align: left;">Optional. Identifier specifying a <code>Boolean</code> variable.</td>
37+
</tr>
38+
</tbody>
39+
</table>
2340

2441
### Return value
2542

@@ -37,6 +54,11 @@ See also
3754

3855
## Behavior
3956

57+
>⚠️**Caution**
58+
>{: .text-grey-lt-000 .bg-green-000 }
59+
If the `QuotingMode` property is set to `QuotationMode.Critical` and the *csvArray* argument points to a jagged array, the *csvArray* array will be turn to a `Variant` Type Two-dimensional array for hold string data. Use jagged arrays keeping in mind they can make the VBA hosting application run out of memory.
60+
{: .text-grey-dk-300 .bg-yellow-000 }
61+
4062
The `FieldsDelimiter`, `RecordsDelimiter` and `EscapeChar` properties sets the method's behavior to the needs.
4163

4264
[Back to Methods overview](https://ws-garcia.github.io/VBA-CSV-interface/api/methods/)

docs/api/methods/getdatafromcsv.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: GetDataFromCSV
33
parent: Methods
44
grand_parent: API
5-
nav_order: 4
5+
nav_order: 5
66
---
77

88
# GetDataFromCSV

docs/api/methods/importfromcsv.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
title: ImportFromCSV
33
parent: Methods
44
grand_parent: API
5-
nav_order: 5
5+
nav_order: 6
66
---
77

88
# ImportFromCSV
99
{: .fs-9 }
1010

11-
Imports a CSV file's content to an array.
11+
Imports a CSV file's content to the current instance.
1212
{: .fs-6 .fw-300 }
1313

1414
---
@@ -55,7 +55,7 @@ See also
5555

5656
## Behavior
5757

58-
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.
58+
User can set `CommentLineIndicator` property 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.
5959

6060
>⚠️**Caution**
6161
>{: .text-grey-lt-000 .bg-green-000 }

docs/api/methods/importfromcsvstring.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
title: ImportFromCSVstring
33
parent: Methods
44
grand_parent: API
5-
nav_order: 6
5+
nav_order: 7
66
---
77

88
# ImportFromCSVstring
99
{: .fs-9 }
1010

11-
Parses a string and save its CSV data to an array.
11+
Parses a string and save its CSV data to the current instance.
1212
{: .fs-6 .fw-300 }
1313

1414
---
@@ -66,4 +66,4 @@ User can set `CommentLineIndicator` for those CSV files having a combination of
6666
>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.
6767
{: .text-grey-dk-300 .bg-yellow-000 }
6868

69-
[Back to Methods overview](https://ws-garcia.github.io/VBA-CSV-interface/api/methods/)
69+
[Back to Methods overview](https://ws-garcia.github.io/VBA-CSV-interface/api/methods/)

docs/api/methods/openconnection.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: OpenConnection
33
parent: Methods
44
grand_parent: API
5-
nav_order: 7
5+
nav_order: 8
66
---
77

88
# OpenConnection

docs/api/methods/resettodefault.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: ResetToDefault
33
parent: Methods
44
grand_parent: API
5-
nav_order: 8
5+
nav_order: 9
66
---
77

88
# ResetToDefault
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
title: TwoDimToJaggedArray
3+
parent: Methods
4+
grand_parent: API
5+
nav_order: 10
6+
---
7+
8+
# TwoDimToJaggedArray
9+
{: .d-inline-block }
10+
11+
New
12+
{: .label .label-purple }
13+
14+
Deconstructs a 2D string array and puts its content into a jagged array.
15+
{: .fs-6 .fw-300 }
16+
17+
---
18+
19+
## Syntax
20+
21+
*expression*.`TwoDimToJaggedArray`*(TwoDimArray, JaggedArray)*
22+
23+
### Parameters
24+
25+
<table>
26+
<thead>
27+
<tr>
28+
<th style="text-align: left;">Part</th>
29+
<th style="text-align: left;">Description</th>
30+
</tr>
31+
</thead>
32+
<tbody>
33+
<tr>
34+
<td style="text-align: left;"><em>TwoDimArray</em></td>
35+
<td style="text-align: left;">Required. Identifier specifying a dynamic <code>Variant</code> array variable.</td>
36+
</tr>
37+
<tr>
38+
<td style="text-align: left;"><em>JaggedArray</em></td>
39+
<td style="text-align: left;">Required. Identifier specifying a dynamic <code>Variant</code> array variable.</td>
40+
</tr>
41+
</tbody>
42+
</table>
43+
44+
### Return value
45+
46+
_None_
47+
48+
---
49+
50+
## Behavior
51+
52+
>⚠️**Caution**
53+
>{: .text-grey-lt-000 .bg-green-000 }
54+
>The *JaggedArray* parameter must holds a set of `String` type arrays, and will be successively deconstructed and erased by the `TwoDimToJaggedArray` method passing its content to the *TwoDimArray* parameter.
55+
{: .text-grey-dk-300 .bg-yellow-000 }
56+
57+
[Back to Methods overview](https://ws-garcia.github.io/VBA-CSV-interface/api/methods/)

0 commit comments

Comments
 (0)