TableRows::importCSV()

Import CSV file

Given CSV file must have the first line as the header containing column names that map exactly to the column names in this FieldtypeTable field.

Usage

// basic usage
$int = $tableRows->importCSV(string $csvFile);

// usage with all arguments
$int = $tableRows->importCSV(string $csvFile, array $options = []);

Arguments

NameType(s)Description
$csvFilestring
$options (optional)array

Return value

int

Number of rows imported

Exceptions

Method can throw exceptions on error:

  • WireException


TableRows methods and properties

API reference based on ProcessWire core version 3.0.260