@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.js
CHANGED
|
@@ -3513,21 +3513,26 @@ var compileRowCells = function(ctx, expr, cellPoints, rowIndex, errs) {
|
|
|
3513
3513
|
return;
|
|
3514
3514
|
}
|
|
3515
3515
|
ctx.currentExpr = expr;
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
|
|
3516
|
+
try {
|
|
3517
|
+
cellPoints.forEach((cellPoint, index) => {
|
|
3518
|
+
const r = cellPoint.Row;
|
|
3519
|
+
const sheet = ctx.sheet;
|
|
3520
|
+
const c = cellPoint.Column;
|
|
3521
|
+
const cell = sheet.findCell(r, c);
|
|
3522
|
+
if (cell === void 0 || cell.value !== void 0 && cell.value !== null && cell.value !== "") {
|
|
3523
|
+
return;
|
|
3524
|
+
}
|
|
3525
|
+
let templateValue = String(expr.value);
|
|
3526
|
+
const macroTokens2 = getMacroTokens(expr);
|
|
3527
|
+
templateValue = resolveFunctionExpr(ctx, templateValue, expr);
|
|
3528
|
+
templateValue = resolveCompileMacroExpr(ctx, templateValue, macroTokens2, index, cellPoints.length);
|
|
3529
|
+
templateValue = resolveAliasExpr(ctx, templateValue, index);
|
|
3530
|
+
cell.value = resolveValueExpr(ctx, templateValue);
|
|
3531
|
+
});
|
|
3532
|
+
} catch (err) {
|
|
3533
|
+
const msg = err.message;
|
|
3534
|
+
throw new Error(`expr:${expr.express}, resolve error: ${msg}`);
|
|
3535
|
+
}
|
|
3531
3536
|
};
|
|
3532
3537
|
var generateWorkSheetCellsPlaceholder = function(ctx, expr, sheet) {
|
|
3533
3538
|
const errs = [];
|