Budgeting
You can turn an .xlsx spreadsheet into categories, groups and accounts of a budget, and you know what the import brings across and what you add afterwards.
The import creates new categories, groups and accounts in a budget from a spreadsheet, so you do not type the numbers again. KOSMA imports the structure and the numbers only. You add formulas and account details in KOSMA afterwards. You need a budget open in Budgeting and a licence that lets you edit it. If a template already has the structure you need, start from the template; see [create a budget from a template](/kb/article/create-a-budget-from-a-template).
Put the data on the first sheet of an .xlsx file. The first row holds the column names in this order, in English, whatever language you use KOSMA in:
The import dialog lists the column names in your interface language, but in the file only the English names work. You can leave out columns at the end that you do not need.
Every row needs a value in Category, Group, No. and Description. Quantity, Price/Unit, Unit and Currency can stay empty. Quantity and Price/Unit hold numbers, and a decimal comma works. Each account number can appear only once in the file. KOSMA skips empty rows.
KOSMA reads only .xlsx files. The button and the file picker also name the older .xls format, but KOSMA cannot import it.
Use one currency in the whole file. KOSMA makes it the budget's default currency and gives it to rows without a currency as well.
If the budget does not have the file's currency yet, KOSMA adds it with exchange rate 1 and makes it the default currency. The exchange rates of the budget's other currencies are then wrong until you enter the current rates in **Currencies**; see [set the currencies and the reporting currency](/kb/article/set-currencies-and-the-reporting-currency).
In Budgeting, choose **Import Data** in the project menu. KOSMA opens **Import Budget Data**.
Click **Load .xls File** and choose the .xlsx file. KOSMA adds the rows to the budget, closes the dialog and shows:
Import complete
KOSMA creates a category for each Category name in the file and a group for each group within it, after the budget's existing content. KOSMA adds the accounts to them in the order of the file. Existing categories, groups and accounts stay as they are. To undo the whole import in one step, press ⌘Z (Ctrl+Z on Windows).
Where a number must depend on other numbers again, add a [formula](/kb/article/write-a-formula) or a [variable](/kb/article/what-variables-are) in KOSMA. KOSMA imports only the result of each spreadsheet formula. Quantities and prices arrive as fixed numbers and no longer change when the numbers they were calculated from change.
In the **Account Details** panel, add what each imported account needs. The import brings nothing into this panel: **Companies**, **Effects**, **Fringes & Supplements**, **Extra Costs** and **Taxes** stay empty on every account. See [how account details work](/kb/article/how-account-details-work).
Keep the account numbers from the file, or renumber the budget with **Edit** > **Renumber Budget Items**. The new categories and groups continue the budget's existing numbering. The numbers from the file usually do not follow KOSMA's numbering pattern, so **Renumber Budget Items** then becomes available. See [number accounts and groups](/kb/article/number-accounts-and-groups).
If the content of the .xlsx file breaks one of the rules in step 1, KOSMA imports nothing and shows:
Import failed — “{file name}” contains invalid data. Check it against the import restrictions and try again.
The dialog stays open. Look in the file for one of these problems, correct it and click **Load .xls File** again:
- no header row, or column names in another order or another language than in step 1 - a row with an empty Category, Group, No. or Description - the same account number twice - a Quantity or Price/Unit cell with text instead of a number - more than one currency
**If Load .xls File is greyed out.** You can only read this budget, for example on a **Free** licence or as a guest without editing access. See [what your licence includes](/kb/article/what-your-licence-includes).
Markdown