Report Export Infrastructure
Component Detail
Infrastructure
medium complexity
backend
0
Dependencies
1
Dependents
0
Entities
0
Integrations
Description
Handles the actual file rendering of Bufdir reports into XLSX and CSV formats using a library such as exceljs, applying the correct column mappings, cell formatting, and Norwegian language headers expected by the Bufdir template. Also supports JSON output for in-app preview consumption.
report-export-infrastructure
Responsibilities
- Render XLSX files with correct sheet structure and Bufdir column headers
- Render CSV files with semicolon delimiter matching Norwegian Excel locale conventions
- Produce JSON representation for in-app preview rendering
- Apply cell formatting (number formats, date formats, merged headers) to XLSX output
Interfaces
renderXlsx(reportData)
renderCsv(reportData)
renderJson(reportData)
getFileBuffer(format, reportData)
getContentType(format)
getFilename(organizationId, period, format)
validateRenderOutput(buffer)