csvProcess

Reads a CSV file line by line, filtering and transforming each row with the functions you pass in.

csvProcess(filePath, rowProcessor, rowFilter [, processRowAsJavaArray] [, csvFormatConfiguration]) → returns void

This function requires Adobe ColdFusion 2025 and up.  Not supported on Lucee, etc.

Argument Reference

filePath string
Required

Path of the CSV file to read.

rowProcessor function
Required

Function called for each row. It receives the row and row number.

rowFilter function
Required

Function that returns true for rows to process.

processRowAsJavaArray boolean

true to pass each row as a Java array, for better performance.
Values:
  • true
  • false

csvFormatConfiguration struct

Struct of parsing options: delimiter, encoding, escapeCharacter, ignoreEmptyLines, nullString, quoteCharacter and trailingDelimiter.

Examples
Sample code invoking the csvProcess function

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub