Leverage Your Data.


Defining which CSV line numbers or row contents shall be skipped


Only for CSV or TEXT files.

This command is only valid for reading input files, not for writing output files. It allows defining line numbers that shall be skipped when reading a CSV file.
It also allows defining one or more line start strings for lines that shall be skipped when reading the CSV file.


+skiprows(line number,line number-line number,...) +skiprows=string,string,string,...

Skipping modes

There are two modes of using the +skiprows command.
- With numbers and number ranges in a bracket parameter, the respective lines of these line numbers are omitted. Line numbering starts with "1".
- With one string or with a comma-separated series of strings as parameter, all lines starting with one of these strings will be omitted. If the comma is part of a string, it must be escaped like "\," . See also Placeholders.

Usage Examples

csvfox infile.csv +skiprows(1-3,10-13) outfile.csv
Reads infile.csv and outputs all data lines unchanged to output.csv, but omitting the first three lines, as well as the lines ten to thirteen.
csvfox infile.csv +skiprows=#,*,+++ outfile.csv
Reads infile.csv, which may contain invalid lines that start with "#","*", or "+++".  Then omits these lines and outputs all other data rows unchanged into outfile.csv.

See also

The ±filter command also filters data rows for input or output. It however does this on the basis of field contents, not on the basis of raw line data (as does this command).
Under construction, coming soon