Skip to main content Link Search Menu Expand Document (external link) Copy Copied

RemoveRecords

Removes a field, at the specified position, from the imported CSV data.


Syntax

expression.RemoveRecords(aIndex, [count])

Parameters

Part Description
aIndex Required. Identifier specifying a Long Type variable. Represents the index at which the records will be deleted.
count Optional. Identifier specifying a Long Type variable. Represents the number of records to be deleted.

Returns value

Type: CSVinterface


See also
ImportFromCSV method, ImportFromCSVstring method.

Behavior

The RemoveRecords method will remove an specified amount of records from the current instance, if they all have the same number of fields.

☕Example

Sub RemoveRecord()
    Dim CSVint As CSVinterface
    
    Set CSVint = New CSVinterface
    With CSVint.parseConfig
        .path = Environ("USERPROFILE") & "\Desktop\Chinese CSV.csv"
        .utf8EncodedFile = True
    End With
    With CSVint
        .ImportFromCSV .parseConfig
        .RemoveRecords 2, 2                              'Remove 2 records starting at the 3th record
    End With
    Set CSVint = Nothing
End Sub

Back to Methods overview