mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-12-25 01:20:30 +00:00
7be1e7e5f8
Fixes #5400 (broken in #4601)
31 lines
672 B
JavaScript
31 lines
672 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,
|
|
wiki: $tw.wiki
|
|
});
|
|
// Return the output tiddlers
|
|
return importer.getResults();
|
|
};
|
|
|
|
})();
|