Cost Control
You can import a period of bookings from an .xlsx or CSV export of your accounting software and tell which cost control set receives them.
Import a period of bookings from your accounting software, such as a DATEV or Excel export, instead of typing each cost item by hand. You need the cost control set open and a mapping set that tells KOSMA which field each column of the file holds. See [set up an import mapping set](/kb/article/set-up-an-import-mapping-set). The dialog has four steps: **File**, **Preview**, **Options** and **Matching**. **Continue** takes you to the next step and **Back** to the one before. **Cancel** closes the dialog and imports nothing.
In the toolbar, click  **Import**. KOSMA opens **Accounting Data Import** at step **File**. Drop the accounting file on **Drop file here**, or click  **Select file** and choose it. Under **Select Import Mapping Set**, choose the mapping set for this file. **Continue** stays greyed out until you have chosen both. KOSMA then marks each card with .
The card says which files KOSMA can read:
**Message:** Only MS Excel (.xlsx) or CSV files can be imported. Data must be in the first sheet.
If you choose a `.xls` file, KOSMA shows:
**Message:** Legacy .xls files are not supported. Please save the file as .xlsx or CSV and try again.
If you choose any other type of file, KOSMA shows:
**Message:** Only .xlsx or .csv files can be imported.
If KOSMA cannot read the file, it shows this message under the card when you click **Continue**, and the dialog stays at step **File**:
**Message:** The file could not be read. Check that it is a valid .xlsx or CSV file and that the data is in the first sheet.
KOSMA reads dates only as day.month.year, such as 31.08.2026 or 31.08.26, in every interface language. A date in another form, such as 31/08/2026 or 2026-08-31, and a cell that Excel formats as a date stop the import at step **Preview**. Amounts in a CSV file, or in a text cell of an .xlsx file, must be in German notation, such as 1.234,56. KOSMA reads 1,250.00 as 1.25 and shows no message. In an .xlsx file, round amounts to two decimal places. KOSMA reads a number with three decimal places, such as 12.345, as 12345, a thousand times the amount.
The file needs no currency or company column. KOSMA gives every line the currency and the company of the mapping set, so choose the mapping set that has the currency of the file. The list shows only the names of the mapping sets. To see the currency of the chosen one, click **Edit** and look at **Currency**. If no mapping set fits the file, click **New**. To change the chosen one, click **Edit**. Both buttons close the dialog and open the mapping set. When you save the mapping set, KOSMA returns to step **File** with your file and that mapping set chosen. If you only looked at the currency, click **Cancel**. KOSMA returns to step **File** in the same way and changes nothing.
Click **Continue**. At step **Preview**, KOSMA lists every line of the file with the mapped columns, **Currency** and **Company**. **Effects** shows how many effects KOSMA found for the line. For a line without effects, the cell stays empty. If every line fits the mapping set, KOSMA shows:
**Message:** {total} lines detected. All lines mapped.
The message means that no line has one of the problems listed below. A line with an empty account cell counts as mapped. KOSMA books it on **Unmapped**, see [if some lines have no account](#if-some-lines-have-no-account).
If some lines do not fit, KOSMA marks them red and shows how many:
**Message:** {total} lines detected. {failed} lines cannot be mapped.
Below that, KOSMA names the problem for each of these lines. If the account number of a line is not in the mapping set, KOSMA shows:
**Message:** Line {line}: No such account
If an effect code of a line is not in the mapping set, KOSMA shows:
**Message:** Line {line}: No such effect
If KOSMA cannot read a date or an amount of a line, it shows:
**Message:** Line {line}: Cannot read "{column}" (column name)
**Continue** stays greyed out while any line has a problem. Click **Back**, then correct the mapping set with **Edit**, or correct the file and choose it again. Then click **Continue** again.
KOSMA leaves out a line whose text cell is empty. It does not count, show or import that line.
Click **Continue**. At step **Options**, decide which set receives the lines. **Copy Cost Control Dataset** is ticked by default. Under it, KOSMA asks:
**Message:** Do you want to create a copy of the cost control dataset before you import accounting data? (recommended)
With this option ticked, KOSMA does not import into the set you have open. KOSMA creates a new set from the budget, with no cost items, and imports the lines into that new set. The set you had open stays as it was. The new set gets the name in the field below, which KOSMA fills with the name of the open set and (copy). The new set holds no earlier bookings, so KOSMA matches no line against existing cost items. KOSMA imports every line, whatever step **Matching** shows.
To import into the set you have open, untick **Copy Cost Control Dataset**. To keep the state of the set before the import as well, copy it first with **Copy Cost Control**, see [copy a cost control set](/kb/article/copy-a-cost-control-set).
**Add Tag To Imported Data** is also ticked by default. The field shows a tag such as Import_20260928_1430, made from the date and time you opened the dialog, and you can change it. KOSMA gives this tag to every new cost item of the import, so you can filter for this import later. KOSMA also adds the tags from the file.
Click **Continue**. At step **Matching**, KOSMA shows the lines in one group per account the file touches. Lines without an account come last, under  **Unmapped**. To open or close all groups at once, click  **Expand** or  **Collapse**. The two buttons show only their icons. KOSMA shows the name when you point at a button.
If you import into the open set, KOSMA compares each line with the cost items already on its account. KOSMA does not import a line again if an existing cost item has the same reference, text, amount and payment date. To see these lines, tick **Show automatically matched data**. Without the tick, a group can show only cost items with the status **Existing** and no line with the status **New**. To replace an existing cost item with a line from the file, see [re-import a period](/kb/article/re-import-a-period). A cost item you replace keeps its tags and does not get the import tag.
Read [consolidate on import](/kb/article/consolidate-on-import) before you tick **Consolidate account predictions**. If you tick it, KOSMA sets the forecast of every account the import writes to down to the sum of its cost items, wherever the forecast was higher. This lasts only until you close the project and changes no stored value.
Click **Import**. If some lines have no account, KOSMA first asks:
**Message:** Import Unmatched Cost Items? {number} cost items have no matching account and will be added under "Unmapped". Import anyway?
To import them under **Unmapped**, click **Import Anyway**.
When the import is done, KOSMA shows **Import Completed**:
**Message:** The cost items have been successfully imported. {number} records successfully imported.
The number counts new and replaced cost items. Matched lines do not count. Click **Ok**. KOSMA shows the set that received the cost items, which is the new set if **Copy Cost Control Dataset** was ticked.
Each line becomes a paid cost item: the amount of the file is the paid amount, the payment date of the file is the payment date, and the cost item has no expected amount. A line without a date gets the date of the import.
To take back the whole import, choose **Edit** > **Undo** right after it.
**If some lines have no account.** KOSMA books these lines on a new account named **Unmapped**, at the end of an account group. That is not always the last group of the grid. To find the account, type Unmapped in the search box. Each import with such lines creates another **Unmapped** account. Move each cost item on it to the account it belongs to. See [move cost items to another account](/kb/article/move-cost-items-to-another-account). To keep the next import from putting these lines on another **Unmapped** account, give them an account number in your accounting export. See [match accounts, effects and companies](/kb/article/match-accounts-effects-and-companies).
**If Import is greyed out.** KOSMA greys out **Import** when you cannot change the set. Point at the greyed-out button: its tooltip names the reason.
Markdown