Austauschdatei: Textspalten im Format Text
Excel machte aus einer getippten Telefonnummer "+43 677 ..." die Zahl 43677... und haette aus "0815" die 815 gemacht; der Import sah dann eine Aenderung, die niemand meinte. Text- und Verweisspalten tragen jetzt das Zahlenformat "Text" (@), damit Excel die Eingabe so laesst, wie sie getippt wurde. Geprueft: lint, tsc, 1002 Tests, Uebergabe-Waechter, Integrationstests Austauschdatei und Import.
This commit is contained in:
@@ -98,9 +98,17 @@ function datenblatt(mappe: ExcelJS.Workbook, inhalt: BlattInhalt, listen: Listen
|
||||
...spalten,
|
||||
];
|
||||
|
||||
// Textspalten im Format „Text": sonst macht Excel aus einer getippten
|
||||
// „+43 660 …" die Zahl 43660… und aus „0815" die 815 — der Import sähe
|
||||
// eine Änderung, die niemand meinte.
|
||||
ws.columns = alle.map((s) => ({
|
||||
width: Math.min(45, Math.max(12, s.titel.length + 4)),
|
||||
style: s.format.art === "datum" ? { numFmt: "dd.mm.yyyy" } : undefined,
|
||||
style:
|
||||
s.format.art === "datum"
|
||||
? { numFmt: "dd.mm.yyyy" }
|
||||
: s.format.art === "text" || s.format.art === "verweis"
|
||||
? { numFmt: "@" }
|
||||
: undefined,
|
||||
}));
|
||||
|
||||
const kopf = ws.getRow(1);
|
||||
|
||||
Reference in New Issue
Block a user