@@ -479,8 +479,8 @@ CSVsubsetSplit_MissingCSVfile:
479479End Function
480480Public Function Dedupe (keys As String ) As CSVArrayList
481481 On Error GoTo ErrHandler_Dedupe
482- Set Dedupe = New CSVArrayList
483- Dedupe.Dedupe keys, parseConfig.Headers
482+
483+ Set Dedupe = P_CSV_DATA .Dedupe( keys, parseConfig.Headers)
484484 Exit Function
485485ErrHandler_Dedupe:
486486 Set Dedupe = Nothing
@@ -721,16 +721,15 @@ Public Function Filter(Pattern As String, Optional filePath As String = vbNullSt
721721 Optional ExcludeFirstRecord As Boolean = True , _
722722 Optional Exclude As Boolean = False ) As CSVArrayList
723723
724- Dim CSVparser As CSVinterface
725-
726- Set Filter = New CSVArrayList
727724 If filePath <> vbNullString Then 'Filter CSV file
725+ Dim CSVparser As CSVinterface
728726 Dim StreamReader As CSVTextStream
729727 Dim streamsCounter As Long
730728
731729 Set CSVparser = New CSVinterface
732730 Set StreamReader = New CSVTextStream
733-
731+ Set Filter = New CSVArrayList
732+
734733 With CSVparser.parseConfig
735734 .delimitersGuessing = True
736735 End With
@@ -749,7 +748,7 @@ Public Function Filter(Pattern As String, Optional filePath As String = vbNullSt
749748 Set CSVparser = Me
750749 If CSVparser.importSuccess Then
751750 ExcludeFirstRecord = (CSVparser.parseConfig.Headers = True )
752- Filter.Concat2 CSVparser.items .Filter(Pattern, 1 + Abs(ExcludeFirstRecord), Exclude)
751+ Set Filter = P_CSV_DATA .Filter(Pattern, 1 + Abs(ExcludeFirstRecord), Exclude)
753752 End If
754753 End If
755754End Function
0 commit comments