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
+32-3Lines changed: 32 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,8 +20,8 @@ Sub ImportRecords()
20
20
SetCSVint=NewCSVinterface
21
21
Setconf=CSVint.ParseConfig
22
22
Withconf
23
-
.path="C:\100000.quoted.csv"
24
-
.dynamicTyping=False
23
+
.path="C:\100000.quoted.csv"
24
+
.dynamicTyping=False
25
25
EndWith
26
26
CSVint.GuessDelimitersconf'Try to guess CSV file data delimiters
27
27
CSVint.ImportFromCSV(conf).DumpToArrayArr'Import and dump the data to an array
@@ -38,7 +38,7 @@ Sub TEST_DynamicTyping()
38
38
DimconfAsparserConfig
39
39
DimCSVstringAsString
40
40
DimArr()AsVariant
41
-
41
+
42
42
SetCSVint=NewCSVinterface
43
43
Setconf=NewparserConfig
44
44
Withconf
@@ -84,4 +84,33 @@ Sub ImportAndDumpToSheet()
84
84
CSVint.ImportFromCSV(conf).DumpToSheet'Import and dump the data to a new Worksheet
85
85
SetCSVint=Nothing'Terminate the current instance
86
86
EndSub
87
+
```
88
+
89
+
The \[EXAMPLE4\] shows how you can dump the imported data to an Access Database. The created table will have some indexed fields.
90
+
91
+
>⚠️**Caution**
92
+
>{: .text-grey-lt-000 .bg-green-000 }
93
+
>This method is only available in the [Access version of the CSVinterface.cls](https://github.com/ws-garcia/VBA-CSV-interface/raw/master/src/Access_version.zip) module.
94
+
{: .text-grey-dk-300 .bg-yellow-000 }
95
+
96
+
#### [EXAMPLE4]
97
+
```vb
98
+
SubImportAndDumpToAccessDB()
99
+
DimpathAsString
100
+
DimconfAsparserConfig
101
+
DimdBaseAsDAO.Database
102
+
103
+
SetCSVint=NewCSVinterface
104
+
Setconf=CSVint.ParseConfig
105
+
Withconf
106
+
.path="C:\100000.quoted.csv"
107
+
.dynamicTyping=False
108
+
EndWith
109
+
CSVint.GuessDelimitersconf'Try to guess CSV file data delimiters
110
+
SetdBase=CurrentDb
111
+
'Import and dump the data into a new database table. This will create indexes for the "Region" field and for the second field in the table.
0 commit comments