@vdhewei/xlsx-template-lib 1.3.1 → 1.3.2
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/index.js +20 -15
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +20 -15
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3435,21 +3435,26 @@ var compileRowCells = function(ctx, expr, cellPoints, rowIndex, errs) {
|
|
|
3435
3435
|
return;
|
|
3436
3436
|
}
|
|
3437
3437
|
ctx.currentExpr = expr;
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3438
|
+
try {
|
|
3439
|
+
cellPoints.forEach((cellPoint, index) => {
|
|
3440
|
+
const r = cellPoint.Row;
|
|
3441
|
+
const sheet = ctx.sheet;
|
|
3442
|
+
const c = cellPoint.Column;
|
|
3443
|
+
const cell = sheet.findCell(r, c);
|
|
3444
|
+
if (cell === void 0 || cell.value !== void 0 && cell.value !== null && cell.value !== "") {
|
|
3445
|
+
return;
|
|
3446
|
+
}
|
|
3447
|
+
let templateValue = String(expr.value);
|
|
3448
|
+
const macroTokens2 = getMacroTokens(expr);
|
|
3449
|
+
templateValue = resolveFunctionExpr(ctx, templateValue, expr);
|
|
3450
|
+
templateValue = resolveCompileMacroExpr(ctx, templateValue, macroTokens2, index, cellPoints.length);
|
|
3451
|
+
templateValue = resolveAliasExpr(ctx, templateValue, index);
|
|
3452
|
+
cell.value = resolveValueExpr(ctx, templateValue);
|
|
3453
|
+
});
|
|
3454
|
+
} catch (err) {
|
|
3455
|
+
const msg = err.message;
|
|
3456
|
+
throw new Error(`expr:${expr.express}, resolve error: ${msg}`);
|
|
3457
|
+
}
|
|
3453
3458
|
};
|
|
3454
3459
|
var generateWorkSheetCellsPlaceholder = function(ctx, expr, sheet) {
|
|
3455
3460
|
const errs = [];
|