#989: KontenplanExcelImporter.kt

projectforge-business/src/main/kotlin/org/projectforge/business/fibu/datev/KontenplanExcelImporter.kt Type: Excel Import Class
Package: org.projectforge.business.fibu.datev
Actual Path: projectforge-business/src/main/kotlin/org/projectforge/business/fibu/datev/KontenplanExcelImporter.kt
Note: The file does not exist at the requested path (.../excelimport/...). It resides in the datev sub-package. The documentation below reflects the actual source. 84 lines · 55 code · 23 comments · 6 blank

Imports a Kontenplan (chart of accounts) from an Excel workbook. The import expects a sheet named "Kontenplan" with account numbers and descriptions. Uses the Merlin Excel framework for parsing and validation.

Architecture

A simple, stateless import class (not a Spring bean). Takes ImportStorage and ExcelWorkbook as parameters.

Column Mapping (Enum: Cols)

EnumHeaderAliasesValidatorTarget Property
KONTOKontoKonto vonNumberValidator (>=1, required, unique)nummer (set manually)
BEZEICHNUNGBezeichnungBeschriftungValidator (required)bezeichnung

Import Flow

  1. doImport(storage, workbook) — retrieves the sheet named "Kontenplan". Throws UserException if not found.
  2. importKontenplan(storage, sheet):

Companion Object

Git History

868d6abb7 2025 -> 2026
63081666f Source file headers: 2024-> 2025.
1012e347a Migration stuff in progress... (all tests of all packages: OK).
b6092df09 Copyright 2023 -> 2024
ab45d51fa Copyright 2001-2022 -> 2001-2023.
5f7ef41b8 Copyright 2021 -> 2022
db3b02da7 UserException moved from business to common package.
ceb63e8a1 Source code header: (C) 2001-2021.
878cb7169 Lots of compiler warnings fixed.
6d8db7350 WIP: Merlin importer...