CSVfox
Leverage Your Data.
 English

±insert

Inserts one or more fields (columns) to the CSV data row before or after a specific position.

Inserts one or more new columns next to an existing column of the data row, and optionally fills each of them with a value.
The value can be a literal, the contents of another field, or any expression.
If you want to append one or more columns at the end of the data row instead, then you can use ±add.

Inserting a single Column

Inserts a new column next to an existing column of the data row, and optionally fills it with a value.

±insert/l is the same as ±insert, which means that the new column will come in front (left) of the existing column.
±insert/r means that the new column will appear after (right from) the existing column.
 

Pattern

±insert[NewFieldName]@[ExistingFieldname] ±insert[NewFieldName]@[ExistingFieldname]=NewFieldValue

Usage Examples

If there is a csv file:

ProductProduct WeightTransport Weight
Apple100g105,000g
Pear120g126,000g
Banana200g210,000g

-insert["Product ID"]@["Product Weight"]
Inserts a new empty column "Product ID" before the column "Product Weight". A subsequent field command can later be used to fill it with a value.
The resulting csv file will be:
ProductProduct IDProduct WeightTransport Weight
Apple100g105,000g
Pear120g126,000g
Banana200g210,000g

More examples

-insert["Line Number"]@[1]=(#)
Inserts a new first column "Line Number" before the recent first column, and initializes it with the current data row number.
Under construction, coming soon