Skip to content

Commit 8629751

Browse files
committed
Improvements: integration with VBAexpressions core modules.
1 parent db3eb5c commit 8629751

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ So far, it has been outlined the way in which you can import the records from a
284284

285285
```
286286
Sub QueryCSV()
287-
Dim CSVint As CSVinterfac
287+
Dim CSVint As CSVinterface
288288
Dim path As String
289289
Dim FilteredData As CSVArrayList
290290
@@ -293,7 +293,6 @@ Sub QueryCSV()
293293
CSVint.parseConfig.Headers = False 'The file has no header record/row
294294
CSVint.parseConfig.path = path
295295
If path <> vbNullString Then
296-
Set CSVrecords = CSVint.ImportFromCSV(CSVint.parseConfig).items
297296
Set FilteredData = CSVint.Filter("f1='Asia' & f9>20 & f9<=50", path) 'Select "Units sold" greater than 20 and less or
298297
'equal to 50 from Asian customers
299298
Set CSVint = Nothing

docs/api/methods/filter.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ When the `FilePath` argument is omitted, the method will proceed to filter the d
6767

6868
```vb
6969
Sub FilterCSV()
70-
Dim CSVint As CSVinterfac
70+
Dim CSVint As CSVinterface
7171
Dim path As String
7272
Dim FilteredData As CSVArrayList
7373

@@ -76,8 +76,7 @@ Sub FilterCSV()
7676
CSVint.parseConfig.Headers = False 'The file has no header record/row
7777
CSVint.parseConfig.path = path
7878
If path <> vbNullString Then
79-
Set CSVrecords = CSVint.ImportFromCSV(CSVint.parseConfig).items
80-
Set FilteredData = CSVint.Filter(path, "f1='Asia' & f9>20 & f9<=50") 'Select "Units sold" greater than 20 and less or
79+
Set FilteredData = CSVint.Filter("f1='Asia' & f9>20 & f9<=50", path) 'Select "Units sold" greater than 20 and less or
8180
'equal to 50 from Asian customers
8281
Set CSVint = Nothing
8382
Set FilteredData = Nothing

docs/examples/advanced-examples.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,14 @@ The \[EXAMPLE1\] shows how you can execute a like SQL simple query over a CSV fi
99

1010
#### [EXAMPLE1]
1111
```vb
12-
Private Sub Query_CSV(path As String, ByVal keyIndex As Long, queryFilters As Variant)
12+
Private Sub Query_CSV(path As String)
1313
Dim CSVint As CSVinterface
1414
Dim CSVrecords As CSVArrayList
1515

1616
Set CSVint = New CSVinterface
1717
If path <> vbNullString Then
18-
Set CSVrecords = CSVint.GetCSVsubset(path, queryFilters, keyIndex) 'data filtered on keyIndex th field
18+
Set CSVrecords = CSVint.Filter("f1='Asia' & f9>20 & f9<=50", path) 'Select "Units sold" greater than 20 and less or
19+
'equal to 50 from Asian customers
1920
CSVint.DumpToSheet DataSource:=CSVrecords 'dump result
2021
Set CSVint = Nothing
2122
Set CSVrecords = Nothing

0 commit comments

Comments
 (0)