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

# Import changes from a CSV or Excel file

> Add or update many Min/Max overrides, lead-time overrides, or item links from one file. Match your columns, check the result, and correct any failed rows.

When you have changes for many items in a spreadsheet, import the file instead
of entering each change by hand. Each row adds or updates one entry, and you
review how Lantern reads your columns before anything is saved.

| Page | What each row saves | Fields to include |
| - | - | - |
| **Min/Max** | A Min/Max override for one item and location | [Min/Max fields](https://docs.lanternhq.com/guides/upload-min-max.md#prepare-your-file) |
| **Smart Lead Times** | A lead-time override for one item, location, and supplier | [Lead-time fields](https://docs.lanternhq.com/guides/lead-times.md#import-lead-time-overrides-from-a-file) |
| **Item Links** | A link from one source item to one target item | [Item Links fields](https://docs.lanternhq.com/features/item-links.md#import-links-from-a-file) |

## Start an import

1. Open the page and drag your file onto its table. On **Item Links**, you can
   also drop the file on the page before you have any links.
2. The import opens at **Match your columns**. Nothing changes until you select
   **Start import**.

If the import says file import isn't available, ask your Lantern team for
help.

## Match your columns

Your column names do not need to match Lantern's labels. Lantern matches the
columns it recognizes, such as **SKU** or **Item Number** for **Item ID**, and
you can change any match. For each field, choose one of:

* **A column from your file.**
* **Use one value for all rows,** where offered, to apply one value to every
  row. For example, choose one supplier for a supplier's quote sheet that has
  no supplier column, or enter one reason for the whole file.
* **Permanent** or **Specific date,** for **Expiration**, to give every row the
  same duration.
* **The default,** for an optional field, shown as an option such as
  **Default: 100%** for an item link's weight.

Required fields are marked with an asterisk. **Start import** stays unavailable
until each one has a column or a shared value.

If your workbook has several worksheets, choose the one to import. Check that
**First row is column names** matches your file. The preview shows the first
three rows as Lantern will read them, with any problems marked, so you can
correct a match before you start.

## What each row does

* **Adds or updates one entry.** A row creates a new override or link, or
  updates the existing one for the same item and location (plus the supplier
  for lead times, or the source and target for item links).
* **Never removes entries missing from your file.** Overrides and links that
  are not in the file stay as they are. Use the page's own remove actions to
  end them. On Item Links, a new or changed link can replace links from your
  ERP for the same source item; see [links from your ERP](https://docs.lanternhq.com/features/item-links.md#links-from-your-erp).
* **Uses the first row for a repeated entry.** If two rows are for the same
  entry, only the first row is used, even if it fails. Later rows are skipped
  as duplicates.
* **Ignores blank rows.** A row with no IDs or values in the matched columns is
  left out of the import and its counts, even if a cell such as its reason is
  filled.

## Check the result

You can close the window while the import runs. It keeps running, and the page
shows its progress.

When it finishes, check **Rows in file**, **Updated**, **Failed**, and any
**Duplicates skipped**. A failed row does not stop the others: updated rows are
saved, and failed rows change nothing. Changes can take a few minutes to appear
on the page.

### Correct failed rows

1. Select **Download failed rows** (or **Download failed and skipped rows**).
   The file keeps your original columns and adds each row's original row number
   and the reason it failed.
2. Correct the failed rows. If a skipped duplicate has the values you want,
   copy them into its failed row. Then delete the skipped duplicates;
   otherwise, uploading them would replace the rows that were already saved.
3. Drop the corrected file on the same table. You can leave the added columns
   in. Choose any shared values again, because they are not part of the file.

The download is available for 30 days after the import. After that, correct
your original file instead.

## File requirements

| Topic | What to know |
| - | - |
| **File type** | A CSV file saved as UTF-8, or an unprotected Excel workbook (`.xlsx`). Save `.xls`, macro-enabled `.xlsm`, or `.ods` files as `.xlsx` first. |
| **Size** | Up to 100 MB and 200 columns. |
| **Rows** | Up to 250,000 rows for Min/Max, 50,000 for Smart Lead Times, and 10,000 for Item Links. An Item Links file is imported all at once, so if Lantern says it is too large, remove columns you do not need or split the file. |
| **Item, location, and supplier IDs** | Matched exactly as written, including case, punctuation, and leading zeros. Spaces before or after an ID are ignored. In Excel, store IDs as text so leading zeros and long numbers stay intact. |
| **Numbers** | Use plain numbers. A comma as a thousands separator, such as `1,000`, is fine. Currency symbols are not accepted. |
| **Percentages** | Enter an item link weight as `50` or `50%`. An Excel cell formatted as a percentage is read as it appears, so a cell showing `50%` imports as 50%. |
| **Expiration** | `Permanent`, or a date written as `YYYY-MM-DD`, `M/D/YYYY`, or with a short month name, such as `Mar 31, YYYY`. Excel date cells also work. The date cannot be in the past. |
| **Hidden and filtered rows** | Excel rows that are hidden or filtered out are still imported. Delete the rows you do not want to change. |
| **Formulas** | Lantern imports the result Excel last saved for each formula cell. Rows fail when that result may be out of date, such as from a `TODAY()` formula or a workbook created by another program without calculating it in Excel. Paste the values, or recalculate and save the workbook in Excel, before uploading. |


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