Preserve QExcell font sizes
This commit is contained in:
@@ -76,7 +76,7 @@ describe("excellOffice OOXML helpers", () => {
|
||||
|
||||
it("сохраняет базовое форматирование ячеек XLSX в XML листа", () => {
|
||||
const cellFormats = {
|
||||
A1: { bold: true, textColor: "0f5fae", fillColor: "fff2cc", horizontalAlign: "center" as const },
|
||||
A1: { bold: true, fontSize: 14, textColor: "0f5fae", fillColor: "fff2cc", horizontalAlign: "center" as const },
|
||||
B2: { italics: true, underline: true },
|
||||
C3: { fillColor: "bad-color" }
|
||||
};
|
||||
@@ -97,7 +97,7 @@ describe("excellOffice OOXML helpers", () => {
|
||||
numFmt: { numFmtId: "164", formatCode: "dd.mm.yyyy" }
|
||||
},
|
||||
fonts: {
|
||||
font: [{}, { b: {}, i: {}, u: {}, color: { rgb: "FF0F5FAE" } }]
|
||||
font: [{}, { b: {}, i: {}, u: {}, sz: { val: "14" }, color: { rgb: "FF0F5FAE" } }]
|
||||
},
|
||||
fills: {
|
||||
fill: [{}, {}, { patternFill: { fgColor: { rgb: "FFFFF2CC" } } }]
|
||||
@@ -116,6 +116,7 @@ describe("excellOffice OOXML helpers", () => {
|
||||
bold: true,
|
||||
italics: true,
|
||||
underline: true,
|
||||
fontSize: 14,
|
||||
textColor: "0F5FAE",
|
||||
fillColor: "FFF2CC",
|
||||
horizontalAlign: "center",
|
||||
@@ -141,6 +142,7 @@ describe("excellOffice OOXML helpers", () => {
|
||||
bold: true,
|
||||
italics: true,
|
||||
underline: true,
|
||||
fontSize: 14,
|
||||
textColor: "0F5FAE",
|
||||
fillColor: "FFF2CC",
|
||||
horizontalAlign: "center",
|
||||
@@ -345,7 +347,7 @@ describe("excellOffice OOXML helpers", () => {
|
||||
mergedCells: [{ start: "A1", end: "C1" }],
|
||||
hyperlinks: { A1: "https://example.com/budget" },
|
||||
cellFormats: {
|
||||
A1: { bold: true, textColor: "0F5FAE", fillColor: "FFF2CC", horizontalAlign: "center" },
|
||||
A1: { bold: true, fontSize: 14, textColor: "0F5FAE", fillColor: "FFF2CC", horizontalAlign: "center" },
|
||||
AC20: { underline: true },
|
||||
D20: { numberFormat: "dd.mm.yyyy" },
|
||||
E20: { numberFormat: "0%" }
|
||||
@@ -379,7 +381,7 @@ describe("excellOffice OOXML helpers", () => {
|
||||
expect(imported.sheets[0].mergedCells).toEqual([{ start: "A1", end: "C1" }]);
|
||||
expect(imported.sheets[0].hyperlinks).toEqual({ A1: "https://example.com/budget" });
|
||||
expect(imported.sheets[0].cellFormats).toEqual({
|
||||
A1: { bold: true, textColor: "0F5FAE", fillColor: "FFF2CC", horizontalAlign: "center" },
|
||||
A1: { bold: true, fontSize: 14, textColor: "0F5FAE", fillColor: "FFF2CC", horizontalAlign: "center" },
|
||||
AC20: { underline: true },
|
||||
D20: { numberFormat: "dd.mm.yyyy" },
|
||||
E20: { numberFormat: "0%" }
|
||||
|
||||
Reference in New Issue
Block a user