# CSV export and import - Sheetline 1.x documentation

> Export the grid as a CSV file for a spreadsheet, and import a CSV to update posts by ID, with a preview of every change first.

> [!NOTE]
> This is part of **Sheetline Pro**.

## Export

1. Search and filter the grid to the posts you want.
2. Click **Export CSV** above the grid.
3. Choose the rows (every post the search and filters find, across all pages, or the selected rows) and the columns (the ones shown in the grid are ticked).
4. Click **Download**.

The file starts with each post's **ID**, then the columns you chose, with a header row. Values are written as you read them in the grid: "Published", an author's name, category names separated by commas ("Guides › Care guides" for a child category), Yes or No, image addresses. It's UTF-8, ready for Excel, Numbers, LibreOffice or Google Sheets. A cell that a spreadsheet would run as a formula (starting with `=`, `+`, `-` or `@`) gets a leading `'`, as WooCommerce's own export does.

## Import

Import updates **existing** posts by their ID. It never creates or deletes posts.

1. Edit an exported file in your spreadsheet and save it as CSV (commas, semicolons or tabs are all fine).
2. Click **Import CSV** above the grid of the same post type, and choose the file.
3. Click **Preview import**.

![The preview of an import](https://storage.extendiment.com/media/1053/screenshot-6-61083268.png)

The preview shows, before anything is saved:

- each change: the post, the column, the value before and after (the first 100),
- rows that are the same as their post already (left alone),
- columns that don't match any of the grid's (left out),
- problems, with the line of the file and the reason: an ID that isn't a post of this type, a status or author that doesn't exist, a category that doesn't exist, a value that isn't allowed. Those rows aren't imported at all.

Click **Import N changes** to save them, in parts of 25 posts with the progress shown. The grid reloads and a notice with an **Undo** link confirms it; the import is one entry in **History**.

## How the file is read

- The **ID** column is required; the other columns are matched to the grid's by their names (as in the header of an exported file) or keys. Their order doesn't matter, and you can leave out any column you don't want to change.
- **An empty cell empties the field** (a blank excerpt removes the excerpt). Leave a column out of the file entirely to keep its values.
- Choices can be written as shown ("Pending review", "Jo Park") or as their key (`pending`, a user ID, or an author's login).
- Categories and tags are names (or slugs, or IDs), separated by commas. They must exist already.
- Images are addresses from your media library, or attachment IDs.
- Dates are `2026-11-02 09:30`, as exported.

The changes wait for an hour after the preview, for you only. Preview again after that.

Source: https://extendiment.com/plugins/sheetline/docs/1.x/csv-export-and-import
