Ejemplo n.º 1
0
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();
};
Ejemplo n.º 2
0
Command.prototype.execute = function() {
	if(this.params.length < 1) {
		return "Missing parameters";
	}
	var self = this,
		wiki = this.commander.wiki,
		filename = this.params[0],
		importSpec = this.params[1],
		XLSXImporter = require("$:/plugins/tiddlywiki/xlsx-utils/importer.js").XLSXImporter,
		importer = new XLSXImporter({
			filename: filename,
			importSpec: importSpec
		});
	$tw.wiki.addTiddlers(importer.getResults());
	return null;
};