On this page
Excel import and export
Purpose
You can enter master data in bulk from Excel files, when you go live or for regular updates. Every file is previewed and checked before anything is saved (M4). Exports use the same columns, so you can export, edit and import again.
Screens that support import
| Screen | Import dialog title | Matched on | Import / export permission |
|---|---|---|---|
| Chart of accounts | Import chart of accounts | Account code | md.account.import / md.account.export |
| Cost centres | Import cost centres | Code | md.cost_center.import / .export |
| Projects | Import projects | Code | md.project.import / .export |
| Exchange rates | Import exchange rates | Currency + rate type + date | md.currency.import / .export |
| Parties | Import parties | Party code | md.party.import / .export |
| Items | Import items | Item code | md.item.import / .export |
| Units | Import units | Unit code | md.lookup.import / .export |
| Lookups | Import lookups (all kinds) | Lookup kind + code | md.lookup.import / .export |
| Item barcodes | Import barcodes | Barcode | md.item.import / .export |
| Warehouses | Import warehouses | Warehouse code | md.warehouse.import / .export |
| Journal vouchers | Import journal voucher | Creates a new draft | gl.journal_voucher.import |
The import dialog
| Part | What it does |
|---|---|
| Excel file (.xlsx) and Choose a file… | Pick the file here. Checking starts straight away |
| Download template | Downloads an empty file with the columns in the interface language (shown if you have the export permission) |
| The note | The first row holds the column headers (Arabic, English or the legacy column names). Rows are matched by their code: existing records are updated, new ones created. Nothing is saved until you import. |
| The summary | New: …, Changed: …, Unchanged: …, Rows with errors: … |
| The preview table | Row, Code, Action (New, Changed, Unchanged or Error) and Messages. It shows the first 200 rows |
| Import | Saves all the rows. It works only when every row is valid |
| Close | Closes the dialog without saving |
Steps
Import a file
- Open the screen and select Import.
- If you don't have a file with the right columns, select Download template and fill it in.
- Select Choose a file… and pick the file. You see Checking the file…, then the summary and the preview.
- If you see All … rows are valid and can be imported., select Import. The screen then shows Import finished: … new, … changed. (on the accounts, dimensions, rates and parties screens) or Imported: … created, … updated. (on the items, units and warehouses screens).
- If you see Correct the rows with errors in the file and choose it again. Nothing is imported while any row has an error., read the Messages column, fix the file, and choose it again.
Update existing data by exporting and re-importing
- Select Export on the screen. A file downloads with the current data in the import columns.
- Change the values in the file, but leave the codes as they are.
- Import the file. Records whose codes match are updated.
Business rules
- All or nothing. When you select Import, the file is checked again and all the rows are saved together. If even one row has an error, nothing is saved (M4).
- Matching on code. If a row's code matches an existing record, that record is updated; otherwise a new record is created. Other records a row refers to (such as a parent account or a unit) are also given by code. Branches are the exception: they're given by name.
- Missing columns. When you update records, any column that isn't in the file keeps its current value.
- Column headers can be in Arabic, English or the legacy system's column names. Letter case, spaces,
_,-and*are ignored. Unknown columns are ignored, with a warning. - Limits. An
.xlsxfile of up to 5 MB and 10,000 rows. The first visible sheet is read, the first row is taken as the header row, and blank rows are skipped. - Numbers use a decimal point (MB2). Dates are
YYYY-MM-DDor an Excel date. Yes/no values are yes or no. - Cost in the items file isn't imported (MB1).
- Exports and templates respect your permissions and data scope.
Error messages
File messages:
| Message | What to do |
|---|---|
| The file cannot be read. Upload an Excel workbook (.xlsx) of at most 5 MB. | Save the file as .xlsx and make it smaller |
| The file is not a readable Excel workbook (.xlsx). | Open the file in Excel and save it again as .xlsx |
| The first sheet is empty. | Put the data on the first sheet |
| The required column … is missing. | Add the column |
| The column … appears twice. | Remove the duplicate |
| The column … is not known and is ignored. | A warning only |
| The file has more than … rows. Split it into several files. | Split the file |
| The file has rows with errors. Nothing was imported. | Correct the rows |
Row messages (each one starts with the column name):
| Message | Meaning |
|---|---|
| …: a value is required. | A required cell is empty |
| …: at most … characters. | The text is too long |
| …: "…" is not a number. / …: "…" is not a whole number. | A non-numeric value |
| …: "…" is not a date (use YYYY-MM-DD or an Excel date). | An invalid date |
| …: "…" is not yes/no. | An invalid yes/no value |
| …: "…" is not allowed (allowed: …). | A value that isn't one of the options |
| The code … already appears in row …. | A code repeated within the file |
| …: there is no account … (in the chart or earlier in the file). | The parent account doesn't exist |
| …: there is no … with code …. | A referenced record doesn't exist |
| …: more than one … is named …. | The name matches more than one record (for example, two branches with the same name) |
| …: the cell contains an Excel error. | The cell has a formula error |
The full list is in the message index.