From 53283217e95d1941c708817490e2ccf3574374a9 Mon Sep 17 00:00:00 2001 From: MarlousKottenhagen <marlouskottenhagen@noreply.git.sheetjs.com> Date: Tue, 10 Oct 2023 06:50:32 +0000 Subject: [PATCH] xlsx-cli support dateFormat option (#3005) Co-authored-by: Marlous Kottenhagen <m.kottenhagen@bigmile.eu> Reviewed-on: https://git.sheetjs.com/sheetjs/sheetjs/pulls/3005 Co-authored-by: MarlousKottenhagen <marlouskottenhagen@noreply.git.sheetjs.com> Co-committed-by: MarlousKottenhagen <marlouskottenhagen@noreply.git.sheetjs.com> --- packages/xlsx-cli/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/xlsx-cli/index.js b/packages/xlsx-cli/index.js index d64852e..83be8b2 100644 --- a/packages/xlsx-cli/index.js +++ b/packages/xlsx-cli/index.js @@ -53,6 +53,7 @@ function run() { .option('-F, --field-sep <sep>', 'CSV field separator', ",") .option('-R, --row-sep <sep>', 'CSV row separator', "\n") .option('-n, --sheet-rows <num>', 'Number of rows to process (0=all rows)') + .option('--date-format <string>', 'output date format, for example yyyy-mm-dd') .option('--codepage <cp>', 'default to specified codepage when ambiguous') .option('--req <module>', 'require module before processing') .option('--sst', 'generate shared string table for XLS* formats') @@ -148,6 +149,7 @@ function run() { } if (program.sparse) opts.dense = false; else opts.dense = true; if (program.codepage) opts.codepage = +program.codepage; + if (program.dateFormat) opts.dateNF = program.dateFormat; if (program.dev) { opts.WTF = true;