forked from sheetjs/sheetjs
		
	updating to 0.5.10
This commit is contained in:
		
							parent
							
								
									16162dd816
								
							
						
					
					
						commit
						f69622550e
					
				
							
								
								
									
										38
									
								
								xlsx.js
									
									
									
									
									
								
							
							
								
								
								
								
								
									
									
								
							
						
						
									
										38
									
								
								xlsx.js
									
									
									
									
									
								
							@ -423,7 +423,7 @@ SSF.load_table = function(tbl) { for(var i=0; i!=0x0188; ++i) if(tbl[i]) SSF.loa
 | 
			
		||||
make_ssf(SSF);
 | 
			
		||||
var XLSX = {};
 | 
			
		||||
(function(XLSX){
 | 
			
		||||
XLSX.version = '0.5.9';
 | 
			
		||||
XLSX.version = '0.5.10';
 | 
			
		||||
var current_codepage, current_cptable, cptable;
 | 
			
		||||
if(typeof module !== "undefined" && typeof require !== 'undefined') {
 | 
			
		||||
	if(typeof cptable === 'undefined') cptable = require('codepage');
 | 
			
		||||
@ -2730,7 +2730,7 @@ function fixopts(opts) {
 | 
			
		||||
	var defaults = [
 | 
			
		||||
		['cellNF', false], /* emit cell number format string as .z */
 | 
			
		||||
		['cellHTML', true], /* emit html string as .h */
 | 
			
		||||
		['cellFormula', true], /* emit formulae as .h */
 | 
			
		||||
		['cellFormula', true], /* emit formulae as .f */
 | 
			
		||||
 | 
			
		||||
		['sheetStubs', false], /* emit empty cells */
 | 
			
		||||
		['sheetRows', 0, 'n'], /* read n rows (0 = read all rows) */
 | 
			
		||||
@ -2811,24 +2811,18 @@ function parseZip(zip, opts) {
 | 
			
		||||
		for(var j = 0; j != wbsheets.length; ++j) {
 | 
			
		||||
			props.SheetNames[j] = wbsheets[j].name;
 | 
			
		||||
		}
 | 
			
		||||
		for(i = 0; i != props.Worksheets; ++i) {
 | 
			
		||||
			try {
 | 
			
		||||
				path = 'xl/worksheets/sheet' + (i+1) + (xlsb?'.bin':'.xml');
 | 
			
		||||
				relsPath = path.replace(/^(.*)(\/)([^\/]*)$/, "$1/_rels/$3.rels");
 | 
			
		||||
				sheets[props.SheetNames[i]]=parse_ws(getzipdata(zip, path),path,opts);
 | 
			
		||||
				sheetRels[props.SheetNames[i]]=parseRels(getzipdata(zip, relsPath, true), path);
 | 
			
		||||
			} catch(e) { if(opts.WTF) throw e; }
 | 
			
		||||
		}
 | 
			
		||||
	} else {
 | 
			
		||||
		for(i = 0; i != props.Worksheets; ++i) {
 | 
			
		||||
			try {
 | 
			
		||||
				//var path = dir.sheets[i].replace(/^\//,'');
 | 
			
		||||
				path = 'xl/worksheets/sheet' + (i+1) + (xlsb?'.bin':'.xml');
 | 
			
		||||
				relsPath = path.replace(/^(.*)(\/)([^\/]*)$/, "$1/_rels/$3.rels");
 | 
			
		||||
				sheets[props.SheetNames[i]]=parse_ws(getzipdata(zip, path),path,opts);
 | 
			
		||||
				sheetRels[props.SheetNames[i]]=parseRels(getzipdata(zip, relsPath, true), path);
 | 
			
		||||
			} catch(e) { if(opts.WTF) throw e; }
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	/* Numbers iOS hack TODO: parse workbook rels to get names */
 | 
			
		||||
	var nmode = (getzipdata(zip,"xl/worksheets/sheet.xml",true))?1:0;
 | 
			
		||||
	for(i = 0; i != props.Worksheets; ++i) {
 | 
			
		||||
		try {
 | 
			
		||||
			//path = dir.sheets[i].replace(/^\//,'');
 | 
			
		||||
			path = 'xl/worksheets/sheet'+(i+1-nmode)+(xlsb?'.bin':'.xml');
 | 
			
		||||
			path = path.replace(/sheet0\./,"sheet.");
 | 
			
		||||
			relsPath = path.replace(/^(.*)(\/)([^\/]*)$/, "$1/_rels/$3.rels");
 | 
			
		||||
			sheets[props.SheetNames[i]]=parse_ws(getzipdata(zip, path),path,opts);
 | 
			
		||||
			sheetRels[props.SheetNames[i]]=parseRels(getzipdata(zip, relsPath, true), path);
 | 
			
		||||
		} catch(e) { if(opts.WTF) throw e; }
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if(dir.comments) parse_comments(zip, dir.comments, sheets, sheetRels, opts);
 | 
			
		||||
@ -2845,8 +2839,8 @@ function parseZip(zip, opts) {
 | 
			
		||||
		Styles: styles,
 | 
			
		||||
	};
 | 
			
		||||
	if(opts.bookFiles) {
 | 
			
		||||
		out.keys = keys,
 | 
			
		||||
		out.files = zip.files
 | 
			
		||||
		out.keys = keys;
 | 
			
		||||
		out.files = zip.files;
 | 
			
		||||
	}
 | 
			
		||||
	return out;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user