Guides
Bringing your history into MyHissab: importing clients, expenses and invoices from CSV
Prepare a CSV file from Excel, confirm the column mapping, read the error report and keep the original number of your past invoices.
By the MyHissab team 9 min read
Were you already invoicing before opening your account, in Excel or with another tool? The CSV import brings in your clients, your expenses and your past invoices without retyping. By the end of this guide, you will know how to prepare a file that Excel exports cleanly, confirm the column mapping, read the error report and keep the number of your old invoices.
What the import covers, and within what limits
The import lives in Settings → Import data. It accepts three types of data, one file per type: clients, expenses and invoices (header and lines). Each file is limited to 5 MB and 2,000 rows: beyond that, only the first 2,000 are processed and a message asks you to split the file. Completely empty rows are ignored.
Start with clients, then invoices. An imported invoice is attached to the client bearing exactly the same name; if that client does not exist, it is created with that name alone. By importing your client records first, with the same spelling, you also recover their address, their NIF and their phone number.
Preparing the file from Excel
- One sheet, one header row, one record per row. Remove merged cells, titles above the table and the total row at the bottom: it would be read as one more record.
- Save as CSV. The separator (semicolon, comma or tab) is detected on the header row. So is the encoding: a "UTF-8" CSV and a Windows-1252 CSV produced by Excel in French both keep their accents.
- Dates as dd/mm/yyyy. The yyyy-mm-dd format is also recognised. A date with a time, or with the month spelled out ("15 March 2026"), is not.
- Amounts as Excel writes them in French. "12 500,50", "12500.50" and "12 500" all mean the same amount. Avoid the English notation "12,500.50": the dot would be taken for a thousands separator and the value read would be 12.50.
- Tax identifiers as text. Format the NIF, NIS, RC and AI columns as text before typing: otherwise Excel displays a 15-digit NIF in scientific notation and the export becomes unreadable.
The simplest approach is still to start from the CSV template offered for each type on the import page: recognised headers and one example row. Paste your data under the header and save.
Recognised columns, type by type
Headers are recognised in French as well as in English, with or without accents, in any order. An unknown column is simply ignored.
| Type | Required columns | Optional columns |
|---|---|---|
| Clients | Name | Contact, Phone, Email, Address, RC, NIF, NIS, AI, Notes |
| Expenses | Label, Amount incl. tax or Amount excl. tax | Date, Category, Payment method, Reference, VAT, Notes |
| Invoices | Date, Client, Description, Quantity, Unit price excl. tax | Number, Due date, Status, Paid at, Line discount %, Discount amount, Global discount percent, Notes |
A few useful details:
- For an expense without a date, the date of the import is used. The payment method accepts "Cash", "Cheque", "Transfer", "Card", "Online", "Other"; an unknown value is filed under "Other".
- The NIF and NIS must contain 15 digits, or 20 with the establishment code; spaces and hyphens are tolerated. The RC and AI follow the same checks as the client record. The guide on the auto-entrepreneur's NIF details these identifiers.
- On an auto-entrepreneur's invoice, VAT does not apply: the "unit price excl. tax" is simply your price.
Invoices: one file row per invoice line
An invoice often has several lines. In the file, each invoice line takes one row, and the same number means the same invoice. The following rows of an invoice may leave the number empty: they attach to the invoice that precedes them. The date, client, status and global discount are read from the first row of each invoice.
Number;Date;Due date;Client;Status;Paid at;Description;Quantity;Unit price;Line discount %;Discount amount
FAC-2026-0012;10/03/2026;09/04/2026;Hydra Services SARL;Paid;25/03/2026;5-page showcase website;1;120 000;0;5 000
FAC-2026-0012;;;;;;Annual hosting;1;18 000;10;
FAC-2026-0013;02/04/2026;;Mme Lina Haddad;Issued;;Monthly maintenance;3;12 500,50;;
Uploaded to Amine Kaci's account, this file creates two invoices:
- FAC-2026-0012, two lines: 120,000 DZD, then 18,000 DZD with a 10% line discount, i.e. 16,200 DZD. Subtotal 136,200 DZD, global discount of 5,000 DZD, total 131,200 DZD. It is marked as paid, and a payment of 131,200 DZD dated 25/03/2026 is created.
- FAC-2026-0013, one line: 3 × 12,500.50 = 37,501.50 DZD, issued, unpaid.
Three rules to remember:
- Discounts: the line discount is a percentage between 0 and 100. The global discount is given as an amount ("Discount amount"). The global discount as a percentage goes in a column headed "Global discount percent" (in French, "Remise globale pct" or "Remise globale en %"); a "Global discount %" header would not be taken as a percentage, the % sign being ignored when headers are read (in French, "Remise globale %" is even read as an amount). If both are filled in, the percentage prevails.
- Status: Draft, Issued or Paid ("Sent" and the French labels, including "Validée" and "Encaissée", are understood too). Without a status, the invoice is imported as issued.
- Payment date: as soon as "Paid at" is filled in, the invoice becomes paid and a payment for the full amount is recorded on that date, with the method "Other" and the reference "CSV import". A "Paid" invoice with no payment date is recorded as collected on its issue date.
If your file has no Number column, each row becomes a separate invoice, numbered by your current series.
The original number, kept for your history
An invoice already issued keeps its number: that is what keeps your numbering continuous, with no gap or duplicate, in line with the mandatory details. The import respects this rule under two conditions:
- the number must be unique, both within the file and among your existing invoices;
- the invoice must be dated before your account was opened. The report shows the reference date if it is refused.
An accepted original number is kept as is and does not touch your series counter. Invoices dated after the account was opened leave the number empty: the current series numbers them.
After the import, open Settings → Document numbering and set the next number so that the series resumes right after your last historical invoice. The guide on custom numbering explains token formats such as FAC-{année}-{séquence:4}.
Running the import step by step
- Open Settings → Import data and choose the type (Clients, Expenses or Invoices).
- Upload your CSV file and click Preview. Nothing is saved at this stage.
- Check the column mapping: for each field, the application proposes the file column it recognised. Correct a match, or choose "— ignore —" for a column you do not want to bring in, then run the preview again. The uploaded file is kept for one hour: no need to upload it again.
- Read the report: the number of valid rows, then the list of rows to fix with the row number, the reason and the value read. The row number counts the header as row 1 and does not count empty rows: if your file contains any, it may be offset by as many rows compared with Excel.
- If one error remains, nothing is written: the import is all or nothing. Fix the rows listed in Excel, save as CSV again and upload the file again.
- When the preview no longer flags anything, click Import. Then check a few records in Clients, Expenses or Invoices.
Paid invoices immediately feed the dashboard's collected revenue, the estimated IFU and the annual cap gauge, for the year of their payment date.
Common mistakes
- "The NIF must contain 15 digits, or 20 with the establishment code": the identifier is incomplete, or Excel converted it into a number. Format the column as text and type the value again.
- "The date is not recognised": the cell contains a time, a month spelled out or an American mm/dd/yyyy format. Switch the column back to dd/mm/yyyy.
- "The amount is not a number" (expenses): the cell is empty, contains a dash or text ("free", "to be defined"). Enter 0 or the actual amount. A currency attached ("12 500 DA") is ignored when read, but you might as well remove it.
- "The quantity must be a number greater than zero." and "The unit price must be a positive number or zero." (invoices): the quantity must be strictly positive; the unit price may be 0, for a free line, but not a dash or text.
- "Row without an invoice number and no invoice precedes it": the orphan row is a detail line with no invoice above it, often after sorting the file. Put it back under its invoice or fill in its number.
- "This invoice number already exists": the number is used for two different invoices in the file, or already exists in your account.
- "An original number is only accepted for invoices dated before the account was opened": clear the number of that invoice so the series numbers it.
- "Status not recognised": the value is neither Draft, Issued nor Paid. "Pending" or "Partial" are not understood.
Frequently asked questions
What happens if I run an import that already succeeded a second time? For clients, a record with the same name is updated, not duplicated. For invoices, an original number already present is refused, but invoices without a number would be created a second time. Expenses have no duplicate check: only run an expenses file again if it failed.
Can I import this year's invoices that I made by hand? Yes, if they are dated before your account was opened: they keep their number. Invoices issued after that date are created directly in the application, as shown in the guide on your first invoice.
My file has 6,000 rows, what should I do? Split it into files of at most 2,000 rows, each with its own header row. For invoices, never cut between two lines of the same invoice: the remainder would become an orphan row.
This information is provided for practical purposes and reflects the texts in force on the update date. It does not replace advice from the ANAE, the tax administration or a professional. Always check the latest version of the official texts.
From theory to your first invoice.
MyHissab applies these rules automatically: legal mention, amount in words, revenue caps. Free, no credit card.