XLSX plugin: Add support for numeric fields

This commit is contained in:
jeremy@jermolene.com 2023-01-30 21:42:44 +00:00
parent 93abe5e3a6
commit 524cee1489
2 changed files with 4 additions and 0 deletions

View File

@ -115,6 +115,7 @@ the
<$select tiddler=<<field>> field="import-field-type" default="string">
<option value="date">date</option>
<option value="string">string</option>
<option value="number">number</option>
</$select>
<$select tiddler=<<field>> field="import-field-source" default="column">
<option value="column">from column</option>

View File

@ -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: