What you need
- Statamic 6.20 or later, on PHP 8.3 or later.
- Composer on the server or in your deployment.
- Statamic Core or Pro. Roles and permissions are a Pro feature, so on Core only the super admin uses the spreadsheet.
Install
- In the folder where your site is installed, run:
composer require karelialabs/statamic-spreadsheet
- Buy a licence on the Statamic Marketplace and attach it to your site in your statamic.com account, as with any paid addon. Local and staging copies of the site need no licence.
Spreadsheet appears under Content in the Control Panel for super admins. To let other roles use it, tick Use the spreadsheet under Users → Roles.
Open a sheet
- Open Content → Spreadsheet and pick a collection, or
- select entries in any entry listing and choose the bulk action Edit in Spreadsheet to open only those.
Use Columns to choose which fields to show. Your choice is remembered per collection in this browser. On a multi-site install, switch site at the top; fields that are not localizable are locked on translations.
Edit
| To | Do this |
|---|---|
| Type into a cell | Select it and start typing, or press Enter or double-click. Enter keeps the value, Esc cancels |
| Move around | Arrow keys and Tab. Shift with the arrows selects a range |
| Paste a block | Copy cells in Excel or Google Sheets, select the top-left cell here and press Ctrl+V |
| Fill down | Drag the small square at the corner of a selection |
| Flip a toggle | Select it and press Enter |
| Pick tags, entries, users, assets or options | Press Enter on the cell to open a picker with search |
| Undo or redo | Ctrl+Z and Ctrl+Y, for every edit, paste, fill, replace and import |
| Save | Save or Ctrl+S |
Nothing is saved until you press Save. Changed cells are highlighted yellow. A value that cannot be right, such as a word in a number field or an unknown tag, is marked red straight away and is not sent.
When you paste, yes/no, true/false and 1/0 all work for toggles, option labels and values both work, and , separates several tags or options. Pasted entry, user and asset values must be IDs (or term slugs for fields with one taxonomy); use the picker to search by title.
Which fields can be edited
| Field type | Editor |
|---|---|
| Text, Textarea, Markdown, Slug, Code, Color, Time, Video | Text |
| Integer, Float, Range | Number |
| Toggle, Published | Toggle |
| Select, Radio, Button Group, Checkboxes | Options, with a picker |
| Date | Date |
| Entries, Terms, Taxonomies, Users, Assets | Picker with search |
| Bard, Replicator, Grid, Table, Group and similar | Shown read-only for reference. Edit them on the entry page |
Saving
Every changed entry is saved the way Statamic's own publish form saves it: through the blueprint's validation rules, the fieldtypes' processing, revisions (as a working copy where revisions are on) and the last-modified information. Errors come back on the exact cell; hover it to read the reason. Entries that saved lose their highlight, and the rest stay so you can fix them and save again.
If a new slug would give two entries the same URL, that entry is not saved and the cell says why.
Find and replace
Find and replace searches one column or every text column. Choose Match case or Whole cell if you need them. It shows how many cells will change before you replace, and the result is one step you can undo.
CSV out and in
Export CSV downloads the visible columns plus an id column. Relationship fields are written as IDs, several values are separated by , and toggles as yes and no. Cells that Excel could run as a formula are written safely.
Import CSV reads the same format, comma or semicolon separated, in UTF-8. Columns can be named by handle or by label, and rows are matched by id (or by slug). Imported values show up as unsaved changes you can check before saving. Rows without a matching entry are skipped and counted. Import never creates or deletes entries.
Permissions
| Permission | Lets the user |
|---|---|
| Use the spreadsheet | Open the spreadsheet. Added under Users → Roles |
On top of that, Statamic's own permissions apply to every cell: users see only entries they can view, can change only entries they can edit, need publish rights to change the status, and cannot change the author unless they may edit other authors' entries.
Configuration
php artisan vendor:publish --tag=statamic-spreadsheet-config
| Option | Default | What it does |
|---|---|---|
limit | 2000 | Most entries loaded into one sheet (STATAMIC_SPREADSHEET_LIMIT). Search, or open a selection, to edit the rest |
Good to know
- Field conditions (show and hide rules) are not applied in the grid. Every field in the blueprint is shown, and its validation rules still apply when saving.
- The grid loads only when a sheet is opened, so the rest of the Control Panel is not slowed down.
- It works with flat files and with the Eloquent driver, in light and dark mode, and on small screens.
Remove the addon
composer remove karelialabs/statamic-spreadsheet
The addon stores nothing of its own on the server, so nothing is left behind.
Need help?
See the support page, or write to the support address there with your Statamic version and the addon version.