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
* Auto exclude any quote mark when data is imported.
14
14
* Allows an user-defined escape token (option not available in _Power Query for Excel 2019_ and with some inconsistences when user launch the _From Text(Legacy)_ wizard)[[1]](#1).
15
15
* Supports One-dimensional arrays, Two-dimensional arrays and [jagged arrays](https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/arrays/jagged-arrays).
Copy file name to clipboardExpand all lines: docs/examples/exportation-examples.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,12 +53,12 @@ End Sub
53
53
The [EXAMPLE2] shows how you can export all the data in VBA array to a CSV file without check the RFC-4180 specs rules. Be careful, use this only if the array doesn't hold especial chars (vbCrLf [vbCr, vbLf], comma [semicolon], double quotes[apostrophe]) in neither of its fields. The output CSV file has neither field needing to be escaped.
CallCSVix.OpenConnection(outputFile,DeleExistingFile:=True)'Open a physical connection to the CSV file
81
-
CSVix.QuotingMode=All'Alter behavior for escaped files
82
-
CSVix.EscapeChar=NullChar'Specify that CSV file has neither field needing to be escaped.
81
+
CSVix.QuotingMode=QuotationMode.All'Alter behavior for escaped files
82
+
CSVix.EscapeToken=EscapeTokens.NullChar'Specify that CSV file has neither field needing to be escaped.
83
83
CallCSVix.ExportToCSV(MyArray)'Export the array content
84
84
SetCSVix=Nothing'Terminate the current instance
85
85
EndSub
86
86
```
87
87
The [EXAMPLE3] shows how you can export all the data in VBA array to a CSV file without check the RFC-4180 specs rules. Each field CSV of the output file need to be escaped by desired char. The procedure presented in the [EXAMPLE3] can be used in whatever circumstance.
>All the examples uses the option `QuotationMode.Critical`, [learn more here](https://ws-garcia.github.io/VBA-CSV-interface/api/enumerations/quotationmode.html).
22
+
{: .text-grey-dk-300 .bg-grey-lt-000 }
23
+
24
+
## Convert a CSV file to TSV
25
+
26
+
The [EXAMPLE1] shows how you can turn a CSV file to TSV.
27
+
28
+
#### [EXAMPLE1]
29
+
30
+
```vb
31
+
SubExportToCSV_RFC4180()
32
+
DimCSVixAsCSVinterface
33
+
DimMyArray()AsString
34
+
DimfilePathAsString,tmpCSVAsString
35
+
DimoutputFileAsString
36
+
37
+
filePath="C:\Demo_400k_records.csv"'Change this to suit your needs
38
+
outputFile="C:\Demo_400k_records.tsv"'Change this to suit your needs
0 commit comments