@vdhewei/xlsx-template-lib 1.6.10 → 1.6.11
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/bin.js +2 -2
- package/dist/bin.js.map +1 -1
- package/dist/bin.mjs +2 -2
- package/dist/bin.mjs.map +1 -1
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -4608,7 +4608,7 @@ async function main() {
|
|
|
4608
4608
|
process.exit(1);
|
|
4609
4609
|
}
|
|
4610
4610
|
});
|
|
4611
|
-
program.command("render").argument("<string>", "xlsx file path").option("-c,--compile", "auto compile flag", false).option("-n,--sheet-name <string>", "render xlsx sheet name when xlsx has multiple sheets").option("-s,--save <string>", "save render xlsx file to user dir").option("-d,--data <string>", "render xlsx file data from").option("--header <string>", "call remote http json data with header", []).option("--body <string>", "call remote http json request with body").action(async (xlsxFile, options) => {
|
|
4611
|
+
program.command("render").argument("<string>", "xlsx file path").option("-c,--compile", "auto compile flag", false).option("-n,--sheet-name <string>", "render xlsx sheet name when xlsx has multiple sheets").option("-s,--save <string>", "save render xlsx file to user dir").option("-d,--data <string>", "render xlsx file data from").option("--header <string>", "call remote http json data with header", []).option("--body <string>", "call remote http json request with body").option("-r,--remove", "remove configure rules sheet", false).action(async (xlsxFile, options) => {
|
|
4612
4612
|
try {
|
|
4613
4613
|
console.log(import_chalk2.default.green("\u{1F4C4} Rendering Excel template..."));
|
|
4614
4614
|
const filePath = await resolveFilePath(xlsxFile);
|
|
@@ -4632,7 +4632,7 @@ async function main() {
|
|
|
4632
4632
|
const ruleSheetName = options.sheetName || compileRuleSheetName;
|
|
4633
4633
|
const opts = new RuleMapOptions();
|
|
4634
4634
|
opts.sheetName = ruleSheetName;
|
|
4635
|
-
opts.remove = false;
|
|
4635
|
+
opts.remove = options.remove || false;
|
|
4636
4636
|
const compiledResult = await compileAll(buffer, opts);
|
|
4637
4637
|
buffer = Buffer.from(compiledResult);
|
|
4638
4638
|
xlsx = await XlsxRender.create(buffer);
|