mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-12-30 20:10:28 +00:00
a485eb8588
Add support for skipping an entire tiddler if a particular column is blank Add support for reading a row by column, making each of the columns into a fieldname. Also significantly refactored the code to break up the main, monolithic function.
30 lines
653 B
JavaScript
30 lines
653 B
JavaScript
/*\
|
|
title: $:/plugins/tiddlywiki/xlsx-utils/deserializer.js
|
|
type: application/javascript
|
|
module-type: tiddlerdeserializer
|
|
|
|
XLSX file deserializer
|
|
|
|
\*/
|
|
(function(){
|
|
|
|
/*jslint node: true, browser: true */
|
|
/*global $tw: false */
|
|
"use strict";
|
|
|
|
/*
|
|
Parse an XLSX file into tiddlers
|
|
*/
|
|
exports["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"] = function(text,fields) {
|
|
// Collect output tiddlers in an array
|
|
var results = [],
|
|
XLSXImporter = require("$:/plugins/tiddlywiki/xlsx-utils/importer.js").XLSXImporter,
|
|
importer = new XLSXImporter({
|
|
text: text
|
|
});
|
|
// Return the output tiddlers
|
|
return importer.getResults();
|
|
};
|
|
|
|
})();
|