@office-open/xlsx 0.9.7 → 0.9.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{context-D-5KiTi9.mjs → context-D6f14vKV.mjs} +19 -23
- package/dist/context-D6f14vKV.mjs.map +1 -0
- package/dist/{file-CgICvJzI.d.mts → file-DDaqjg-B.d.mts} +56 -27
- package/dist/file-DDaqjg-B.d.mts.map +1 -0
- package/dist/{generate-DWMr3rAE.mjs → generate-DS-qtz9W.mjs} +2 -2
- package/dist/{generate-DWMr3rAE.mjs.map → generate-DS-qtz9W.mjs.map} +1 -1
- package/dist/generate.d.mts +1 -1
- package/dist/generate.mjs +1 -1
- package/dist/index.d.mts +14 -14
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/parse.d.mts +1 -1
- package/dist/parse.mjs +1 -1
- package/package.json +3 -3
- package/dist/context-D-5KiTi9.mjs.map +0 -1
- package/dist/file-CgICvJzI.d.mts.map +0 -1
|
@@ -642,10 +642,10 @@ const stylesDesc = {
|
|
|
642
642
|
const fillId = attrNum(xf, "fillId");
|
|
643
643
|
const borderId = attrNum(xf, "borderId");
|
|
644
644
|
const numFmtId = attrNum(xf, "numFmtId");
|
|
645
|
-
if (fontId !== void 0) style.
|
|
646
|
-
if (fillId !== void 0) style.
|
|
647
|
-
if (borderId !== void 0) style.
|
|
648
|
-
if (numFmtId !== void 0) style.
|
|
645
|
+
if (fontId !== void 0) style.fontId = fontId;
|
|
646
|
+
if (fillId !== void 0) style.fillId = fillId;
|
|
647
|
+
if (borderId !== void 0) style.borderId = borderId;
|
|
648
|
+
if (numFmtId !== void 0) style.numFmtId = numFmtId;
|
|
649
649
|
xfs.push(style);
|
|
650
650
|
}
|
|
651
651
|
result.cellStyleXfs = xfs;
|
|
@@ -664,10 +664,10 @@ const stylesDesc = {
|
|
|
664
664
|
const protectionEl = findChild(xf, "protection");
|
|
665
665
|
const protection = protectionEl ? parseProtection(protectionEl) : void 0;
|
|
666
666
|
const style = {};
|
|
667
|
-
if (fontId > 0) style.
|
|
668
|
-
if (fillId > 0) style.
|
|
669
|
-
if (borderId > 0) style.
|
|
670
|
-
if (numFmtId > 0) style.
|
|
667
|
+
if (fontId > 0) style.fontId = fontId;
|
|
668
|
+
if (fillId > 0) style.fillId = fillId;
|
|
669
|
+
if (borderId > 0) style.borderId = borderId;
|
|
670
|
+
if (numFmtId > 0) style.numFmtId = numFmtId;
|
|
671
671
|
if (alignment) style.alignment = alignment;
|
|
672
672
|
if (protection) style.protection = protection;
|
|
673
673
|
if (attr(xf, "quotePrefix") === "1") style.quotePrefix = true;
|
|
@@ -5081,23 +5081,19 @@ var XlsxReadContext = class {
|
|
|
5081
5081
|
resolveStyle(styleIndex) {
|
|
5082
5082
|
const ps = this.parsedStyles;
|
|
5083
5083
|
if (!ps) return void 0;
|
|
5084
|
-
const cellXfs = ps
|
|
5084
|
+
const { cellXfs, fonts, fills, borders, customNumFmts } = ps;
|
|
5085
5085
|
if (!cellXfs || styleIndex >= cellXfs.length) return void 0;
|
|
5086
5086
|
const xf = cellXfs[styleIndex];
|
|
5087
5087
|
const result = {};
|
|
5088
|
-
const
|
|
5089
|
-
|
|
5090
|
-
const
|
|
5091
|
-
|
|
5092
|
-
const
|
|
5093
|
-
if (
|
|
5094
|
-
const
|
|
5095
|
-
if (
|
|
5096
|
-
|
|
5097
|
-
if (borderIdx !== void 0 && borders && borderIdx < borders.length) result.border = borders[borderIdx];
|
|
5098
|
-
const numFmtIdx = xf.numFmtIdx;
|
|
5099
|
-
if (numFmtIdx !== void 0 && customNumFmts) {
|
|
5100
|
-
for (const [code, id] of Object.entries(customNumFmts)) if (id === numFmtIdx) {
|
|
5088
|
+
const fontId = xf.fontId;
|
|
5089
|
+
if (fontId !== void 0 && fonts && fontId < fonts.length) result.font = fonts[fontId];
|
|
5090
|
+
const fillId = xf.fillId;
|
|
5091
|
+
if (fillId !== void 0 && fills && fillId < fills.length) result.fill = fills[fillId];
|
|
5092
|
+
const borderId = xf.borderId;
|
|
5093
|
+
if (borderId !== void 0 && borders && borderId < borders.length) result.border = borders[borderId];
|
|
5094
|
+
const numFmtId = xf.numFmtId;
|
|
5095
|
+
if (numFmtId !== void 0 && customNumFmts) {
|
|
5096
|
+
for (const [code, id] of Object.entries(customNumFmts)) if (id === numFmtId) {
|
|
5101
5097
|
result.numFmt = code;
|
|
5102
5098
|
break;
|
|
5103
5099
|
}
|
|
@@ -5127,4 +5123,4 @@ function resolveWsTarget(wsPath, target) {
|
|
|
5127
5123
|
//#endregion
|
|
5128
5124
|
export { Styles as C, sharedStringsDesc as E, worksheetDesc as S, SharedStrings as T, commentsDesc as _, workbookDesc as a, calcChainDesc as b, tableDesc as c, pivotTableDesc as d, PivotFilterType as f, drawingDesc as g, externalLinkDesc as h, buildTablePartsXml as i, pivotCacheDefDesc as l, collectUniqueValues as m, XlsxWriteContext as n, TableType as o, aggregate as p, buildExternalReferencesXml as r, TotalsRowFunction as s, XlsxReadContext as t, pivotCacheRecordsDesc as u, vmlNotesDesc as v, stylesDesc as w, stringifyWorksheet as x, chartsheetDesc as y };
|
|
5129
5125
|
|
|
5130
|
-
//# sourceMappingURL=context-
|
|
5126
|
+
//# sourceMappingURL=context-D6f14vKV.mjs.map
|