@leankylin-sheet/excel 5.2.54 → 5.2.56
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.esm.js +9 -4
- package/dist/index.js +9 -4
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -5183,10 +5183,15 @@ var setStyleAndValue = function setStyleAndValue(table, worksheet, variables) {
|
|
|
5183
5183
|
}
|
|
5184
5184
|
if (cell.f && _typeof(v) !== "object") {
|
|
5185
5185
|
var formulaStr = cell.f.startsWith("=") ? cell.f.slice(1) : cell.f;
|
|
5186
|
-
|
|
5187
|
-
|
|
5188
|
-
|
|
5189
|
-
}
|
|
5186
|
+
var hasVariables = cell.f.includes("{{");
|
|
5187
|
+
if (hasVariables) {
|
|
5188
|
+
value = v;
|
|
5189
|
+
} else {
|
|
5190
|
+
value = {
|
|
5191
|
+
formula: replaceVariablesInFormula(formulaStr, variables, table.id),
|
|
5192
|
+
result: v
|
|
5193
|
+
};
|
|
5194
|
+
}
|
|
5190
5195
|
} else {
|
|
5191
5196
|
value = v;
|
|
5192
5197
|
}
|
package/dist/index.js
CHANGED
|
@@ -5195,10 +5195,15 @@ var setStyleAndValue = function setStyleAndValue(table, worksheet, variables) {
|
|
|
5195
5195
|
}
|
|
5196
5196
|
if (cell.f && _typeof(v) !== "object") {
|
|
5197
5197
|
var formulaStr = cell.f.startsWith("=") ? cell.f.slice(1) : cell.f;
|
|
5198
|
-
|
|
5199
|
-
|
|
5200
|
-
|
|
5201
|
-
}
|
|
5198
|
+
var hasVariables = cell.f.includes("{{");
|
|
5199
|
+
if (hasVariables) {
|
|
5200
|
+
value = v;
|
|
5201
|
+
} else {
|
|
5202
|
+
value = {
|
|
5203
|
+
formula: replaceVariablesInFormula(formulaStr, variables, table.id),
|
|
5204
|
+
result: v
|
|
5205
|
+
};
|
|
5206
|
+
}
|
|
5202
5207
|
} else {
|
|
5203
5208
|
value = v;
|
|
5204
5209
|
}
|