{ columns, rows } Data structure used by Graphy agents and chart configs. The format is auto-detected from the file extension.
fromFile
Signature
FileParseOptions combines spreadsheet options with the hasHeader flag from delimited parsing.
Options
Whether the first row contains column headers (CSV/TSV only). When
false,
columns are auto-named Column 1, Column 2, etc.Locale for number parsing. Determines thousand/decimal separator conventions.
Maximum allowed input size in megabytes. Throws an error if the input exceeds this limit.
Supported Extensions
Unsupported extensions throw an error listing the supported formats.
Examples
With the AI SDK
Error Handling
fromFile uses Node.js fs.readFile under the hood and is not available in
the browser. For browser usage, use the format-specific parsers (fromCSV,
fromXLSX, etc.) after reading the file with the File API.
