CsvFileInputRecordStream.SkipRecords
- Aktualisiert2025-07-21
- 2 Minute(n) Lesezeit
CsvFileInputRecordStream.SkipRecords
Syntax
CsvFileInputRecordStream.SkipRecords( numRecords)
Return Value
Returns 0 if numRecords were successfully skipped. Returns - 1 if end of file was encountered before numRecords were skipped. Returns 1 if the end of a table was encountered before numRecords were skipped.
Purpose
Skip the specified number of records. Implements InputRecordStream.SkipRecords .
Remarks
CsvFileInputRecordStream is designed to work with CSV files that may contain multiple tables. Strictly speaking, such files are not compliant with RFC 4180, but many common spreadsheet applications support them regardless.
If CsvFileInputRecordStream.SkipRecords encounters an empty line or a line with nothing but separator characters, it returns 1 to indicate it has reached the end of the current table. CsvFileInputRecordStream.ReadRecordTo returns -1 to indicate it has reached the end of the underlying file.
Applications that only need to read the current table do not have to be aware of end-of-table vs end-of-file distinction, as InputRecordStream.SkipRecords defines end of file to be any non-zero return value. However, applications that are aware they are reading a CsvFileInputRecordStream can distinguish between having reached the end of the current table and the actual end of the file by checking if the return value is +1 or -1 .
Parameters
numRecords As Long
[In] The number of records to skip. Refer to InputRecordStream.SkipRecords for more information.