> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cfo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Upload a CSV as a data source

> Upload a CSV export, such as bank transactions or a report from a system cfo.ai does not connect to, so its rows feed your Model. How to prepare the file, upload it, replace it with a newer version, and handle Excel workbooks and PDFs.

Upload a CSV when the numbers you need are not in a system cfo.ai connects to, such as an export from an unsupported accounting or payroll tool, a one-off report, or a list you keep by hand. Its rows become Variables and Dimensions you can use in tables and formulas. An upload never refreshes on its own, so upload the new version when the numbers change.

## Prepare the file

* Save it as a `.csv` file of up to 500 MB. One row can hold up to 16 MiB; a quote that opens a field and never closes makes its row run to the end of the file, and the load fails.
* Give every record the same number of fields as the line of column names. A quoted field may hold line breaks.
* Separate fields with commas, semicolons, or tabs; cfo.ai reads which separator the file uses.
* Report title lines above the table are skipped, because cfo.ai reads the file to find where its table starts and ends. A line that totals a list of records, such as the **Grand Total** under a payroll or invoice report, is skipped too, while the total row of an account schedule or a financial statement loads as one of its rows. If a file still does not load, delete those lines, or attach the file to a chat instead; Ari cleans up a copy and loads that. A file can also load with fewer rows than it holds when the table cfo.ai located ends early; Ari's load note counts the records loaded against the records in the file.
* Leave codes as they are. On its first load, a column of account numbers, card suffixes, or IDs with a leading zero, such as `00123`, or with more than 15 digits loads as text, so no zero or digit is lost. A later upload keeps each column's stored type, so a column that first loaded as numbers stays numbers; see [How columns become Variables and Dimensions](https://docs.cfo.ai/reference/imported-data.md#how-columns-become-variables-and-dimensions).
* Name a date column with the word "date", such as `Posting Date` or `invoice_date`, when the file writes dates as eight digits like `20260105` and every value that is not empty is a real calendar date. cfo.ai then loads the column as dates instead of numbers on its first load; a later upload keeps a column that first loaded as numbers. See [Dates in CSV files](https://docs.cfo.ai/reference/imported-data.md#dates-in-csv-files).

An upload uses no plan slot. [How imported data loads](https://docs.cfo.ai/reference/imported-data.md#csv-files) lists how cfo.ai reads names, numbers, and dates.

## Upload the file

> [tab] Ask Ari
>
> Attach the CSV to a chat message. The file's tile shows **Data source** and **Chat only**. A CSV starts on **Data source**, which imports it into cfo.ai as a data source when you send. Say what the file holds and which column dates the rows:
>
> > This is our bank transactions export for 2026. Load it as a data source. The Posted Date column dates each row.
>
> Ari tells you when the rows are in. Choose **Chat only** instead when you want Ari to read or summarize the file without loading it.

> [tab] By hand
>
> **1. Open the upload**
>
> In the sidebar, point at **Connections** and select **+** (**Add integration**). On the **Integrations** tab, select **Upload**.
>
> **2. Choose the files**
>
> **Import CSV files** opens: **Each file creates a separate data source in cfo.ai.** Drop one or more files, or select **Click to upload or drag and drop**; the hint reads **CSV up to 500 MB each**.
>
> **3. Import**
>
> Select **Import** and the number of files. Each file appears under **Connections**, named after the file.
>
> **4. Tell Ari what the file holds**
>
> Ask Ari to use the data, and name the column that dates the rows, such as an invoice date. Ari writes the saved query that brings the rows into your Model. An upload keeps one saved query: Ari's query takes the place of the **Uploaded CSV** query cfo.ai adds first, unless a formula, a table, or a value you changed already reads that first query, in which case both stay. See [Saved queries](https://docs.cfo.ai/reference/imported-data.md#saved-queries).

## Replace the file with a newer version

Select the file's row in the sidebar to open its page, and select **Update file**. **Update CSV file** opens; choose the new file. Its rows replace the old ones. When the columns keep their names, your tables and formulas keep reading the same Variables.

You can also attach a file with the same name to a chat. Ari asks before it replaces the existing data source.

## Use a CSV from another chat

Ari can load a CSV you attached in any of your chats in this workspace. Name the file. If more than one of your chats holds a file with that name, Ari asks which one you mean.

## Excel workbooks and PDFs

The **Upload** button takes CSV files only.

* To load one sheet of an Excel workbook as data, attach the workbook to a chat and ask Ari to load that sheet as a data source. You can also save the sheet as a CSV and upload it.
* To rebuild a whole workbook model, see [Import an existing spreadsheet model](https://docs.cfo.ai/guides/import-a-spreadsheet-model.md).
* To keep a workbook in sync, store it in Google Drive and [connect it](https://docs.cfo.ai/guides/connect-a-google-sheet.md).
* To use a PDF, such as a bank statement, attach it to a chat and ask Ari to turn its table into a data source. Check the totals Ari reports against the statement.

## Remove the file

Point at the file's row in the sidebar and select the trash button, **Remove file**, or open its page and select **Remove file**. Confirm **Do you want to remove this file? This cannot be undone.** The rows the file loaded stay in your Model and stop updating. A cell that still reads them opens a page headed **Connection removed** from **View source**, with **Replace with Ari** to find and replace that data; see [A removed connection's page](https://docs.cfo.ai/reference/connection-statuses.md#a-removed-connections-page).

## If the file does not load

The row reads **The file couldn’t load**, followed by what was wrong, such as **the header row has 5 columns and row 12 has 6**. Fix the file and select **Update file**. To see what went wrong, ask Ari; it can copy the file you uploaded into the chat and read it. [Connection statuses and actions](https://docs.cfo.ai/reference/connection-statuses.md#messages-about-uploaded-files) lists every message.

If your Model shows fewer rows than the file, the saved query may filter them on purpose. See [Check that your numbers match your books](https://docs.cfo.ai/guides/check-imported-data.md).

## Related

* [How imported data loads](https://docs.cfo.ai/reference/imported-data.md)
* [Attach files to a chat](https://docs.cfo.ai/guides/attach-files.md)
* [Connect your accounting system](https://docs.cfo.ai/guides/connect-accounting.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.