The Flex HRM payroll files (xlsx and dta)
How a month becomes a Flex HRM import file: the header rows, the data rows, when one expense becomes two rows, and what's left out.
Flex HRM (xlsx) and Flex HRM (dta) are made for importing into Flex HRM, and into Aspia, which reads the same format. Both hold the month's approved lines in Flex HRM's import layout: two or three header rows, then one or two rows per expense.
Get the file
On Reports, select Download on the month, then Flex HRM (xlsx) or Flex HRM (dta). Both hold the same data. They differ in file type and in one header row. Example names: 2026-05-flex-xlsx-report.xlsx and 2026-05-flex-dta-report.dta.
The header rows
| Row | What it holds | In xlsx | In dta |
|---|---|---|---|
| 1 | The version line Version: 1.3 Manuellt skapad, which tells Flex HRM how to read the file | Yes | Yes |
| 2 | Three dates as YYYYMMDD: the day the file was built, the first day of the month, and the last day of the month | Yes | Yes |
| 3 | Column titles: Anstnr, Löneartsnr, and so on up to Belopp | Yes | No |
The dta file leaves out row 3 on purpose. Flex HRM would read the titles as an employee's data.
The data rows
Each data row is one payroll entry. Only these columns are filled in:
| Column | What it holds |
|---|---|
| Anstnr | The employee number. |
| Löneartsnr | The löneart set for the category or benefit. Löneart: the pay code your payroll system books a line on. |
| Belopp | The amount the allowance covered. |
The Kontering columns (cost centre and account) and the quantity columns stay empty. The xlsx file has 24 columns in all, the dta file 16. The extra xlsx columns at the end stay empty too.
Which löneart a row uses:
| Line | Löneart |
|---|---|
| Most expenses | The nettolöneart |
| A BIK expense (a taxed benefit) | The nettolöneart, with the benefit value. There's no förmånsvärde row. The förmånsvärde shows in the Excel file. |
| A salary sacrifice to pension, or an old pension order | The bruttolöneart |
| The VAT part of a split expense | The deductible VAT löneart |
When one expense becomes two rows
An uploaded expense report that isn't BIK splits into two rows when its category has a Löneart avdragsgill moms and the receipt's VAT rate is above 0%:
- A net row on the nettolöneart: the covered amount without VAT.
- A VAT row on the deductible VAT löneart: the VAT part.
The two add up to the covered amount. Example: 1,000 kr covered at 25% VAT gives 800 kr and 200 kr. See Deductible VAT on its own payroll line.
What's left out
- Lines with no löneart on their category or benefit. The row can't be built, so it's skipped.
- Amounts of 0 kr or less, including a split part that rounds to 0 kr. A purchase paid fully from salary is 0 kr, so it's left out too.
- Overused allowance deductions for leavers. They have no löneart, so they're not in the file. They are in the Excel file.
Check the Excel file for the same month if something seems missing. It lists every line, with or without a löneart.
Troubleshooting
- My import sees one row too many at the top. You're importing the xlsx file, which has the column titles. Use Flex HRM (dta) for import.
- An employee's lines are missing. Check that the category or benefit has a löneart. A line without one is skipped.
- Anstnr is empty on a row. The employee has no employee number in CLVR, so the import can't match the row. Add the number to the employee.
- A row is lower than the receipt. Belopp is what the allowance covered, not always the full receipt. See When a payroll value looks wrong.
- I expected one row but see two. That's the deductible VAT split: a net row and a VAT row that add up to the covered amount.