How to import journal entries from a CSV or Excel file
What is it for?
When a company comes from another program, not everything fits into the opening balances or the open documents: rents, insurance, adjustments, the previous year's miscellaneous operations journal. This wizard reads a file with one row per journal item, groups the rows that share the same key into a single journal entry and creates them in the journal the file indicates.
Before saving, the wizard checks everything and tells you, row by row, what is wrong. It is all or nothing: with a single wrong row, nothing is saved.
When to use it?
- To bring journal entries from a period already closed in the previous software that you need to keep for reference (see “Import as migrated history”).
- To bring journal entries from miscellaneous operations journals of the current fiscal year.
- To reverse an already posted journal entry, with the reason from the official list.
- Do not use it for invoices, credit notes, receipts or other certified documents: these are issued in invoicing, and the wizard refuses sales and purchase journals. To bring them in, see Migrate series and certified documents.
- Do not use it for the opening trial balance or for the open invoices of customers and suppliers: they have their own wizards and using both doubles the balances (see Opening balances and Open documents).
Where to find it?
Accounting › Record › Entries › Import, then click Import entries.
Before you start
-
Your profile is Administrator or Certified accountant: the Import entries button requires the “Fiscal Migration / Import” permission, which only these two profiles carry. With the Accountant, Auditor or Administrative profile the button is not available and the window does not open: ask someone with one of the two profiles to do the import. Pending validation by a certified accountant: who should be able to import journal entries.
-
The accounts in the file exist in the company's chart of accounts, with the full code (account “62” is not enough; you need the account you post to, for example
6261). Customer and supplier accounts always carry the partner, who must already exist with the same tax number (NIF). -
The journal of each entry is a miscellaneous operations journal. An entry can have only one journal, one date and one reference: all rows with the same key must have the same ones.
-
The date is not in a locked period. If the fiscal year is already closed, the import is refused, even as Migrated history: import before locking or ask the Fiscal officer to change the lock date (see “Common problems”).
-
The file is CSV (comma or semicolon) or XLSX, with a header in the first row. Amounts have no sign: debit and credit are separate columns. Example, with made-up data (each table row is a file row; save with a semicolon between columns):
Lançamento Data Diário Referência Conta Parceiro Descrição Débito Crédito E105/03/2026ODRENDA-036261Renda do escritório de março 50,00E105/03/2026ODRENDA-03121Renda do escritório de março 50,00E220/03/2026ODREG-ALFA-12111599999993Regularização do Cliente Alfa 120,00E220/03/2026ODREG-ALFA-17888Regularização do Cliente Alfa 120,00The Lançamento column is the key: the same value on every row of the same entry (here
E1andE2).E2turns a credit balance of Cliente Alfa, an overpayment that will not be refunded, into income. A sale or a provision of services (accounts 71 and 72) is never posted this way, because it needs an invoice. Write the date as05/03/2026or2026-03-05.
How to use it
- In Import entries, click Choose a file and choose the file. If the file has no journal column, choose the Journal in the window (only miscellaneous operations journals appear). In Mode, leave Create as draft to review the entries before posting them, or choose Create and post. Click Read the file.
- The window shows each column of the file, a sample of its content and the field it goes to. It is already filled in when the column names are recognised; correct anything that is swapped. The entry key, date, account, debit and credit are required. Click Check.
- Nothing is saved at this step. With no errors, the window says “2 entries, 4 journal items, total €170.00. Nothing is saved until you press Import.” and shows Row Count 4, Move Count 2 and Error Count 0. Check these numbers against the file (€50.00 plus €120.00) and click Import. If there are errors, the Import button does not appear (see “Common problems”).
- At the question “The entries will be created. This cannot be undone in bulk: each entry is reversed individually. Continue?”, click Confirm.
- The window says “2 entries created (Create as draft).” Click See entries.
- Open each entry, check the lines against the file and click Publish. The entry becomes Posted and gets the journal number, here
OD/2026/00001. In draft, a banner warns how many days have passed since the end of the month the entry relates to (limit of the Corporate Income Tax Code (CIRC), art. 123, no. 3): it is a warning and nothing is blocked. The list that opens from See entries shows the invoice columns (Number, Due, Total amount) and not the date or the reference: open the entry to check.
Expected result
-
Two journal entries in the Miscellaneous Operations journal, with the date, reference and description from the file, in the state you chose in Mode. The lines created are those of the file:
Entry Account Partner Debit Credit RENDA-036261Rendas e alugueres€50.00 121Depósitos à ordem€50.00 REG-ALFA-12111Clientes geraisCliente Alfa, Lda €120.00 7888Outros não especificados€120.00 -
The SAF-T transaction type of each entry is N — Normal. Pending validation by a certified accountant: SAF-T transaction type of imported journal entries.
-
Each entry gets a note saying who imported it and from which file, and the import is recorded in the import log, with the file name and Records created 2.
Wizard options
Import as migrated history
To bring the entries of previous years as an archive, tick Migrated history before Read the file. The window stops showing Journal and Mode: the entries are always posted in the Migrated history journal, with the numbers HMIG/2025/00001 onwards, whatever the journal in the file. In the demo, a file with two 2025 entries gave “2 entries created (Create and post)”.
To consult what was imported this way, see View the history from the previous software. Import the history before locking the period it belongs to.
Reverse a posted journal entry
Add to the file the columns Reversal of (the number of the posted entry, for example OD/2026/00001) and Reversal reason, with the catalogue code: return (return of goods), price_error (price error), quantity_error (quantity or item error), cancellation (cancellation of the operation), discount (discount or rebate granted) or other (other, to be described). For other add the Reversal description column, up to 50 characters: without it the wizard says “The reason "Other (describe)" needs a description (up to 50 characters).” The line columns are those of a normal entry, with the amounts reversed.
In the demo, the file with entry E10 (debit 121 and credit 6261, both €50.00, on 31/03/2026) and the reason cancellation created entry OD/2026/00002, posted, linked to OD/2026/00001, with the reason “Cancellation of the operation”. Only a posted entry can be reversed; invoices, payments and bank lines are reversed on their own form.
Other columns you can link
In the second step, the Goes to list also offers: Partner country, Source partner key, Due date, Tax on the line, Tax that originated the line, Tax tags, Source system tax tags, Currency, Amount in currency, Product and SAF-T transaction type.
- Currency and Amount in currency: the amount in currency has no sign; the sign follows debit and credit. In the demo, the line of
92,00in debit withUSDand100,00got €92.00 and 100.00 USD, and the customer account with a due date of 10/05/2026. The wizard does not convert: the euro amount is what is in the Debit and Credit columns. Pending validation by a certified accountant: the exchange rate to use in foreign-currency journal entries. - Tax on the line, Tax that originated the line and Tax tags are filled in only if the previous software has them; they affect VAT, so leave them empty when you are not sure. Pending validation by a certified accountant: filling in the tax columns and tax tags in an imported journal entry.
Important notes
- It is all or nothing: one wrong row and nothing is saved.
- The wizard treats a cell that starts with
=,+,-or@as text, never as a formula. - An entry with the same journal, the same reference and the same date as an existing one is refused, so as not to duplicate it. So the same file imported twice into the same company gives one error per entry.
- With the Parceiro column empty on a third-party account, the entry is not accepted: the customer statement and the SAF-T need the partner.
Common problems
Several problems in the same file
- Symptom: “8 problem(s) found in the file. Nothing was saved. Fix the rows listed below in the file and read it again; the import only runs when the file has no problems.” The window lists, by file row (row 1 is the header), the entry and what is wrong. Row Count stays at 0.
- What to do: correct the file, click Back and choose it again. The following messages are the ones seen in the test file.
“Account … does not exist”
- Symptom: “Account "999999" does not exist in company. Check the code in the chart of accounts.” The same happens with an incomplete code, such as
62. - What to do: check the code in Chart of accounts and create the account if it is missing.
“Entry … is not balanced”
- Symptom: “Entry "E3" is not balanced: debit 20,00, credit 15,00, difference 5,00. An unbalanced entry is never saved; fix the amounts.”
- What to do: add up the debit and credit of the rows with the same key, find the difference and correct the amount or add the missing row.
“The date … is not valid”
- Symptom: “The date "31/02/2026" is not valid. Use YYYY-MM-DD or DD/MM/YYYY.” The message appears on each row of the entry.
- What to do: write a date that exists, such as
05/03/2026or2026-03-05.
“The date … is in a locked period”
- Symptom: “The date 10/12/2025 is in a locked period (Global lock date (31/12/2025)). Nothing can be imported there; change the date or ask the fiscal manager.”
- What to do: use a date after the lock date. Ticking Migrated history does not help: in the demo the same message appeared with the option ticked. If the entry really has to be in that period, ask the Fiscal officer to change the lock date. Pending validation by a certified accountant: changing a lock date to import journal entries.
“Account … is a third-party account and needs a partner” or partner not found
- Symptom: “Account 2111 is a third-party account and needs a partner (customer or supplier statement and SAF-T). Fill in the partner on this row.” With a NIF that does not exist: “No partner found for "510000000" (VAT or exact name). Create the partner first.”
- What to do: fill in the Parceiro column with the NIF and, if the partner does not exist, create it first.
“There is no journal with the code …” or a journal that is not a miscellaneous operations journal
- Symptom: “There is no journal with the code "XYZ" in company.” With a sales journal: “Journal FT is not a miscellaneous journal. Invoices, receipts and other certified documents are issued in billing and are never imported as journal entries.”
- What to do: use the code of a miscellaneous operations journal (here
OD) or choose the Journal in the window.
“An entry with the same journal, reference … already exists”
- Symptom: “An entry with the same journal, reference "RENDA-03" and date already exists (Draft entry (RENDA-03)). Importing it again would duplicate it.”
- What to do: if the previous entry was correct, do not import again. If it was wrong, delete the draft or reverse the posted entry before repeating.
“The row has debit and credit at the same time”
- Symptom: “The row has debit and credit at the same time. Split it into two rows.” The same applies to a row with neither, and to an amount that is not a positive number.
- What to do: split the row in two, one in debit and the other in credit. In the Amount in currency column, the message “The amount in currency "-100,00" is not valid. Use a positive number: the sign follows debit/credit.” asks for the value without a sign.
Reversal without a reason or with the wrong number
- Symptom: “A reversal needs its reason (reversal reason code from the catalogue). Fill in "Reversal reason (code)".” With a number that does not exist, or that is still in draft: “The entry to reverse "OD/2026/00099" was not found among the posted entries, or the number is ambiguous.”
- What to do: fill in the reason code and check the number in Journal entries. Post the entry to be reversed first.