sheetjs-clone/bits/83_ods.js
SheetJS 3d1f0f79ca version bump 0.8.7: bundlers
demos for browserify/requirejs/webpack
2017-03-04 20:14:08 -05:00

22 lines
706 B
JavaScript

/* Helper functions to call out to ODS */
function get_ods() {
if(typeof module !== "undefined" && typeof require !== 'undefined' && typeof ODS === 'undefined') ODS = require('./ods.js');
return ODS;
}
function parse_ods(zip, opts) {
get_ods();
if(typeof ODS === 'undefined' || !ODS.parse_ods) throw new Error("Unsupported ODS");
return ODS.parse_ods(zip, opts);
}
function write_ods(wb, opts) {
get_ods();
if(typeof ODS === 'undefined' || !ODS.write_ods) throw new Error("Unsupported ODS");
return ODS.write_ods(wb, opts);
}
function parse_fods(data, opts) {
get_ods();
if(typeof ODS === 'undefined' || !ODS.parse_fods) throw new Error("Unsupported ODS");
return ODS.parse_fods(data, opts);
}