You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/examples/importation-examples.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,9 +18,9 @@ nav_order: 1
18
18
19
19
## Import CSV file data
20
20
21
-
The [example1] shows how you can import all the data from a CSV file using the RFC-4180 standard as paramount.
21
+
The [EXAMPLE1] shows how you can import all the data from a CSV file using the RFC-4180 standard as paramount.
22
22
23
-
#### [example1]
23
+
#### [EXAMPLE1]
24
24
*Note: the example uses the option `QuotationMode.Critical`, [learn more here](https://ws-garcia.github.io/VBA-CSV-interface/api/enumerations/quotationmode.html).*
25
25
```vb
26
26
SubImportRecords_RFC4180()
@@ -39,9 +39,9 @@ End Sub
39
39
40
40
## Import top 10 records from a CSV file into a VBA array
41
41
42
-
The [example2] shows how you can import the Top 10 records from a CSV file using the RFC-4180 standard as paramount.
42
+
The [EXAMPLE2] shows how you can import the Top 10 records from a CSV file using the RFC-4180 standard as paramount.
43
43
44
-
#### [example2]
44
+
#### [EXAMPLE2]
45
45
*Note: the example uses the option `QuotationMode.Critical`, [learn more here](https://ws-garcia.github.io/VBA-CSV-interface/api/enumerations/quotationmode.html).*
46
46
```vb
47
47
SubImportTopTenRecords_RFC4180()
@@ -58,9 +58,9 @@ Sub ImportTopTenRecords_RFC4180()
58
58
SetCSVix=Nothing'Terminate the current instance
59
59
EndSub
60
60
```
61
-
The [example3] accomplishes the same task of the *example1*, the difference is that a temporary variable is used to store the CSV file's content instead of use the `OpenConnection` method. Also, the *example3* shows how to omit the CSV's headers.
61
+
The [EXAMPLE3] accomplishes the same task of the [EXAMPLE1], the difference is that a temporary variable is used to store the CSV file's content instead of use the `OpenConnection` method. Also, the [EXAMPLE3] shows how to omit the CSV's headers.
62
62
63
-
#### [example3]
63
+
#### [EXAMPLE3]
64
64
*Note: the example uses the option `QuotationMode.Critical`, [learn more here](https://ws-garcia.github.io/VBA-CSV-interface/api/enumerations/quotationmode.html).*
65
65
```vb
66
66
SubImportTopTenRecords_RFC4180()
@@ -79,9 +79,9 @@ End Sub
79
79
```
80
80
81
81
## Import ten middle records from a CSV file into a VBA array
82
-
The [example4] shows how you can import 10 middle records from a CSV file using the RFC-4180 standard as paramount.
82
+
The [EXAMPLE4] shows how you can import 10 middle records from a CSV file using the RFC-4180 standard as paramount.
83
83
84
-
#### [example4]
84
+
#### [EXAMPLE4]
85
85
*Note: the example uses the option `QuotationMode.Critical`, [learn more here](https://ws-garcia.github.io/VBA-CSV-interface/api/enumerations/quotationmode.html).*
86
86
```vb
87
87
SubImportTenMiddleRecords_RFC4180()
@@ -104,11 +104,11 @@ End Sub
104
104
105
105
This is the fastest way to work with CSV files because the CSV interface class don't check the syntax given at the RFC-4180 standard. If your CSV files has trailing spaces, or you don't know if it holds a field needing to be escaped, please [reset the config options](https://ws-garcia.github.io/VBA-CSV-interface/api/methods/resettodefault.html) for the current instance to avoid incorrect results.
106
106
107
-
The [example5] shows how you can import all the data from a CSV file without checking the syntax given at the RFC-4180 standard. The file to be parsed has neither field needing to be escaped.
107
+
The [EXAMPLE5] shows how you can import all the data from a CSV file without checking the syntax given at the RFC-4180 standard. The file to be parsed has neither field needing to be escaped.
*Note: the example uses the option `QuotationMode.All`, and `EscapeType.NullChar`*
113
113
```vb
114
114
SubImportRecords()
@@ -126,11 +126,11 @@ Sub ImportRecords()
126
126
SetCSVix=Nothing'Terminate the current instance
127
127
EndSub
128
128
```
129
-
The [example6] shows how you can import all the data from a CSV file without checking the syntax given at the RFC-4180 standard. In the file to be parsed, all fields need to be escaped.
129
+
The [EXAMPLE6] shows how you can import all the data from a CSV file without checking the syntax given at the RFC-4180 standard. In the file to be parsed, all fields need to be escaped.
0 commit comments