How to skip the CSV header row

Often CSV files have header rows. How to skip them when reading the CSV file?

FIRST, LAST, EMAIL
Donald,Knuth,team@a9t9.com
Ashu,Zarathushtra,Zarathushtra2018@gmail.com
Yasna,Haptanghaiti,Happy123456@unknownstartup.com

The solution is to set the !csvReadLineNumber variable to the start row (in this case 2).

You need to make sure to do this before using the csvRead command in your macro.

Example macro:

{
  "Name": "DemoCsvReadWithHeaderRow",
  "CreationDate": "2025-3-9",
  "Commands": [
    {
      "Command": "store",
      "Target": "2",
      "Value": "!csvReadLineNumber",
      "Description": "Start at row 2 = Skip row 1 (header)"
    },
    {
      "Command": "csvRead",
      "Target": "ReadCSVTestData.csv",
      "Value": "",
      "Description": "Read once outside loop to set the !csvReadStatus variable"
    },
    {
      "Command": "echo",
      "Target": "Status = ${!csvReadStatus}, line = ${!csvReadLineNumber}",
      "Value": "blue",
      "Description": ""
    },
    {
      "Command": "while",
      "Target": "${!csvReadStatus} == \"OK\"",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "echo",
      "Target": "Reading CSV line No.  ${!csvReadLineNumber} ",
      "Value": "green",
      "Description": ""
    },
    {
      "Command": "echo",
      "Target": "First Name= ${!COL1}",
      "Value": "green",
      "Description": ""
    },
    {
      "Command": "echo",
      "Target": "Last Name= ${!COL2}",
      "Value": "green",
      "Description": ""
    },
    {
      "Command": "store",
      "Target": "true",
      "Value": "!errorignore",
      "Description": "There will be an error when we attempt to read past the end of the CSV file. Ignore this error. We break the loop by checking on the !csvReadStatus value. It will be OK or END_OF_FILE."
    },
    {
      "Command": "csvRead",
      "Target": "ReadCSVTestData.csv",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "store",
      "Target": "false",
      "Value": "!errorignore",
      "Description": "Ignore errors only for csvRead"
    },
    {
      "Command": "executeScript_Sandbox",
      "Target": "return Number(${!csvReadLineNumber})+1",
      "Value": "!csvReadLineNumber",
      "Description": "Add one to line number = Next line number"
    },
    {
      "Command": "end",
      "Target": "",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "echo",
      "Target": "Done with CSV file",
      "Value": "green",
      "Description": ""
    }
  ]
}