sheetjs/bits/71_wscommon.js
SheetJS e1f8dbb863 version bump 0.7.2: bughunt
- read BOM, handle UTF16LE-encoded XML
- handle namespaces in [Content_Types].xml
- parse workbook rels to determine sheet files
- numbers OSX boolean support (apparently requires "0" or "1")
- XLSX force "General" style to be serialized, omit implied cell type and style
- updated SSF to 0.7.0 (h/t @sysarchitect)
- updated jszip to 2.2.2
- removed old tests/files path, replaced with test_files
- themes written
- ignore potential existence of thumbnail when calculating relationship ids
2014-05-22 05:16:51 -07:00

24 lines
688 B
JavaScript

var strs = {}; // shared strings
var _ssfopts = {}; // spreadsheet formatting options
RELS.WS = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet";
function get_sst_id(sst, str) {
for(var i = 0; i != sst.length; ++i) if(sst[i].t === str) { sst.Count ++; return i; }
sst[sst.length] = {t:str}; sst.Count ++; sst.Unique ++; return sst.length-1;
}
function get_cell_style(styles, cell, opts) {
var z = opts.revssf[cell.z||"General"];
for(var i = 0; i != styles.length; ++i) if(styles[i].numFmtId === z) return i;
styles[styles.length] = {
numFmtId:z,
fontId:0,
fillId:0,
borderId:0,
xfId:0,
applyNumberFormat:1
};
return styles.length-1;
}