2016-10-23 21:49:59 +00:00
|
|
|
/*\
|
|
|
|
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({
|
2021-01-16 15:37:50 +00:00
|
|
|
text: text,
|
|
|
|
wiki: $tw.wiki
|
2016-10-23 21:49:59 +00:00
|
|
|
});
|
|
|
|
// Return the output tiddlers
|
2016-11-14 15:23:15 +00:00
|
|
|
return importer.getResults();
|
2016-10-23 21:49:59 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
})();
|