From 524cee1489f260375cac8cfe878fdc5942a4596e Mon Sep 17 00:00:00 2001 From: "jeremy@jermolene.com" Date: Mon, 30 Jan 2023 21:42:44 +0000 Subject: [PATCH] XLSX plugin: Add support for numeric fields --- plugins/tiddlywiki/xlsx-utils/controls.tid | 1 + plugins/tiddlywiki/xlsx-utils/importer.js | 3 +++ 2 files changed, 4 insertions(+) diff --git a/plugins/tiddlywiki/xlsx-utils/controls.tid b/plugins/tiddlywiki/xlsx-utils/controls.tid index 339237062..208ffb1a6 100644 --- a/plugins/tiddlywiki/xlsx-utils/controls.tid +++ b/plugins/tiddlywiki/xlsx-utils/controls.tid @@ -115,6 +115,7 @@ the <$select tiddler=<> field="import-field-type" default="string"> + <$select tiddler=<> field="import-field-source" default="column"> diff --git a/plugins/tiddlywiki/xlsx-utils/importer.js b/plugins/tiddlywiki/xlsx-utils/importer.js index d634ca55d..2bb963ab6 100644 --- a/plugins/tiddlywiki/xlsx-utils/importer.js +++ b/plugins/tiddlywiki/xlsx-utils/importer.js @@ -132,6 +132,9 @@ XLSXImporter.prototype.processField = function(fieldImportSpecTitle) { value = $tw.utils.stringifyDate(new Date((cell.v - (25567 + 2)) * 86400 * 1000)); } break; + case "number": + value = cell.v.toString(); + break; case "string": // Intentional fall-through default: