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 ​

ScreenImport dialog titleMatched onImport / export permission
Chart of accountsImport chart of accountsAccount codemd.account.import / md.account.export
Cost centresImport cost centresCodemd.cost_center.import / .export
ProjectsImport projectsCodemd.project.import / .export
Exchange ratesImport exchange ratesCurrency + rate type + datemd.currency.import / .export
PartiesImport partiesParty codemd.party.import / .export
ItemsImport itemsItem codemd.item.import / .export
UnitsImport unitsUnit codemd.lookup.import / .export
LookupsImport lookups (all kinds)Lookup kind + codemd.lookup.import / .export
Item barcodesImport barcodesBarcodemd.item.import / .export
WarehousesImport warehousesWarehouse codemd.warehouse.import / .export
Journal vouchersImport journal voucherCreates a new draftgl.journal_voucher.import

The import dialog ​

PartWhat it does
Excel file (.xlsx) and Choose a file…Pick the file here. Checking starts straight away
Download templateDownloads an empty file with the columns in the interface language (shown if you have the export permission)
The noteThe 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 summaryNew: …, Changed: …, Unchanged: …, Rows with errors: …
The preview tableRow, Code, Action (New, Changed, Unchanged or Error) and Messages. It shows the first 200 rows
ImportSaves all the rows. It works only when every row is valid
CloseCloses the dialog without saving

Steps ​

Import a file ​

  1. Open the screen and select Import.
  2. If you don't have a file with the right columns, select Download template and fill it in.
  3. Select Choose a file… and pick the file. You see Checking the file…, then the summary and the preview.
  4. 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).
  5. 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 ​

  1. Select Export on the screen. A file downloads with the current data in the import columns.
  2. Change the values in the file, but leave the codes as they are.
  3. 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 .xlsx file 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-DD or 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:

MessageWhat 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):

MessageMeaning
…: 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.