forked from jappel/leistungsbilanz-ts
Harden Linear XLSX end to end
This commit is contained in:
parent
2581beee3c
commit
4ff01b2ccd
26 changed files with 522 additions and 246 deletions
26
tests/fixtures/revit-xlsx-fixtures.ts
vendored
26
tests/fixtures/revit-xlsx-fixtures.ts
vendored
|
|
@ -122,6 +122,32 @@ export async function createRevitXlsxFixture(options?: {
|
|||
return new Uint8Array(await workbook.xlsx.writeBuffer());
|
||||
}
|
||||
|
||||
export async function createLargeRevitXlsxFixture(objectCount: number) {
|
||||
const workbook = new ExcelJS.Workbook();
|
||||
const worksheet = workbook.addWorksheet("Linear Export");
|
||||
worksheet.addRow([
|
||||
"Worksharing-ID", "CAx_Auswahlkenner", "MEP-Raum: Nummer", "MEP-Raum: Name",
|
||||
"Familie und Typ", "CAX_AnzahlObjekte", "CAx_Anmerkung", "kbp_Stromkreisnummer",
|
||||
"kbp-E-Verteiler", "kbp-E-Stromkreis", "kbp-E-Bezeichnung",
|
||||
"kbp-E-Elektrische Leistung", "kbp-E-Spannung", "kbp-E-Stromstärke", "IfcGUID",
|
||||
]);
|
||||
worksheet.addRow([]);
|
||||
for (let index = 0; index < objectCount; index += 1) {
|
||||
const suffix = String(index + 1).padStart(8, "0");
|
||||
worksheet.addRow([
|
||||
`AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEE-${suffix}`,
|
||||
`Steckdose ${index + 1}`,
|
||||
String(100 + (index % 250)),
|
||||
`Raum ${index % 250}`,
|
||||
"Steckdose: Standard",
|
||||
(index % 4) + 1,
|
||||
null, null, null, null, null, null, null, null,
|
||||
`IFC-${suffix}`,
|
||||
]);
|
||||
}
|
||||
return new Uint8Array(await workbook.xlsx.writeBuffer());
|
||||
}
|
||||
|
||||
function setRowValues(
|
||||
worksheet: ExcelJS.Worksheet,
|
||||
rowNumber: number,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue