Data Export & Import
On this page
The Data Export & Import addon gets your data out of the panel as a CSV or JSON file, and brings data back in, without a database tool. Import is careful by design: you match the columns yourself, you decide what happens to rows that already exist, and a dry run shows you what would change before anything does.
It is for the owner who wants a spreadsheet of the dealers, an accountant who asks for the invoices, or a centre moving its product list in from Excel.
Switching it on
Data Export & Import is free and comes with the script. Open Admin → Addons and press Enable on the Data Export & Import Addons card. Its screen is More → Export / Import.
Settings
Admin → Addons → Settings on the card.
| Setting | What it does |
|---|---|
| Allow importing (not only exporting) | Turn this off on a live site if only exports should be possible. |
| Rows per batch | Default 500. Lower it on a small shared host if an import times out. |
| Include deleted rows in exports | Off, records you deleted in the panel are left out of the file. |
What can be moved
| Data | Matched on |
|---|---|
| Brands | name |
| Products | SKU |
| Serial numbers | serial number |
| Free products | name |
| Dealers | dealer code |
| Users | |
| Invoices | invoice number |
| Invoice lines | its own ID |
| Warranty cards | card number |
| Warranty claims | claim number |
| Price lists | its own ID |
| Support tickets | ticket number |
| Settings | setting name |
Some addons add their own data while they are switched on: Coupons with Discount & Coupon, Ledger with Accounts Management, and Dealer customers and Retail sales with Dealer Network. Only what is really in your database is offered.
Passwords never leave: the users file has no password column.
Exporting
- Open More → Export / Import.
- Under Export, tick what you want. Each item shows how many rows it holds.
- Choose the File type: CSV (Excel) or JSON.
- If you want only part of it, fill in Created from and Created up to.
- Press Download.
One item gives one file. Pick more than one and you get a single JSON file holding all of them.
CSV files open straight in Excel, and Bangla text shows correctly.
Importing
- Take a backup first. With the Backup & Restore addon on, the screen has a Take a backup now button.
- Under Import, choose What the file holds, pick The file (CSV or JSON) and press Look at the file.
- The next screen, Match the columns, lists every Column in your file, where it Goes into, and what the First row looks like. Columns with the same name are matched for you. Anything left as — ignore — is not imported.
- Choose When a row already exists: Update it with the file's values, Leave it alone, or Add another one anyway.
- Leave Dry run — tell me what would happen, change nothing ticked the first time, and press Run the import.
- Read the result: Would add, Would update, Skipped, and What went wrong row by row. Nothing was changed.
- Go back, untick the dry run and run it again. This time the result says Added, Updated and Skipped.
A row without a value in its matching column (for example a product with no SKU) is skipped and listed under What went wrong.
Rules worth knowing
- Export the same thing first. That file is the right shape to edit and send back.
- Import in order: brands, then products, then serial numbers; dealers before invoices. A record has to exist before another one can point at it.
- The
idcolumn is ignored on purpose. IDs belong to this database, not to the file. Rows are matched on their own key from the table above. - Use JSON when moving data between two copies of the script; use CSV when a person will edit it in Excel.
A typical job: a product list from Excel
- Export Products as CSV, so you have the right columns.
- Paste your own list into it in Excel, one product per row, each with its own SKU, and save it as CSV.
- Import it as Products with Update it with the file's values and the dry run ticked.
- Check the numbers: new SKUs should be Would add, existing ones Would update.
- Run it for real, then check a few products in the Catalogue.
Tips
- An import changes many rows at once and there is no undo button. The backup is your undo.
- Turn Allow importing off once your data is in, so nobody imports a wrong file by mistake.
- Patients have their own importer in the Patient & Customer Management addon.