1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-30 12:00:28 +00:00
TiddlyWiki5/plugins/tiddlywiki/xlsx-utils/deserializer.js
Jermolene 8de4583d6c Add first pass at XLSX Utilities plugin
Thanks to @stevesunypoly for help with preparing the demo spreadsheet
2016-10-23 22:49:59 +01:00

30 lines
657 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.importTiddlers();
};
})();