forked from sheetjs/sheetjs
SheetJS
7b6fb7b327
- read MSO HTML (fixes #419 h/t @vineetl fixes #458 h/t @tienne) - roll out xml namespace fix (closes #362 h/t @PierreOCXP) - cellDates clarifications
14 lines
558 B
JavaScript
14 lines
558 B
JavaScript
/* Part 3: Packages */
|
|
function parse_ods(zip/*:ZIPFile*/, opts/*:?ParseOpts*/) {
|
|
opts = opts || ({}/*:any*/);
|
|
var ods = !!safegetzipfile(zip, 'objectdata');
|
|
if(ods) var manifest = parse_manifest(getzipdata(zip, 'META-INF/manifest.xml'), opts);
|
|
var content = getzipdata(zip, 'content.xml');
|
|
if(!content) throw new Error("Missing content.xml in " + (ods ? "ODS" : "UOF")+ " file");
|
|
return parse_content_xml(ods ? content : utf8read(content), opts);
|
|
}
|
|
|
|
function parse_fods(data/*:string*/, opts/*:?ParseOpts*/) {
|
|
return parse_content_xml(data, opts);
|
|
}
|