forked from sheetjs/sheetjs
		
	XLSX write sheetFormat option (fixes #437)
note: @sheetjsdev authored commit, original PR date/author used
This commit is contained in:
		
							parent
							
								
									4743085cb5
								
							
						
					
					
						commit
						563efd88f1
					
				| @ -323,6 +323,9 @@ function write_ws_xml(idx/*:number*/, opts, wb/*:Workbook*/, rels)/*:string*/ { | ||||
| 	o[o.length] = (writextag('sheetPr', null, {'codeName': escapexml(wb.SheetNames[idx])})); | ||||
| 	o[o.length] = (writextag('dimension', null, {'ref': ref})); | ||||
| 
 | ||||
| 	/* TODO: store in WB, process styles */ | ||||
| 	if(opts.sheetFormat) o[o.length] = (writextag('sheetFormatPr', null, {defaultRowHeight:opts.sheetFormat.defaultRowHeight||'16', baseColWidth:opts.sheetFormat.baseColWidth||'10' })) | ||||
| 
 | ||||
| 	if(ws['!cols'] !== undefined && ws['!cols'].length > 0) o[o.length] = (write_ws_xml_cols(ws, ws['!cols'])); | ||||
| 	o[sidx = o.length] = '<sheetData/>'; | ||||
| 	ws['!links'] = []; | ||||
|  | ||||
| @ -9224,6 +9224,9 @@ function write_ws_xml(idx/*:number*/, opts, wb/*:Workbook*/, rels)/*:string*/ { | ||||
| 	o[o.length] = (writextag('sheetPr', null, {'codeName': escapexml(wb.SheetNames[idx])})); | ||||
| 	o[o.length] = (writextag('dimension', null, {'ref': ref})); | ||||
| 
 | ||||
| 	/* TODO: store in WB, process styles */ | ||||
| 	if(opts.sheetFormat) o[o.length] = (writextag('sheetFormatPr', null, {defaultRowHeight:opts.sheetFormat.defaultRowHeight||'16', baseColWidth:opts.sheetFormat.baseColWidth||'10' })) | ||||
| 
 | ||||
| 	if(ws['!cols'] !== undefined && ws['!cols'].length > 0) o[o.length] = (write_ws_xml_cols(ws, ws['!cols'])); | ||||
| 	o[sidx = o.length] = '<sheetData/>'; | ||||
| 	ws['!links'] = []; | ||||
|  | ||||
							
								
								
									
										3
									
								
								xlsx.js
									
									
									
									
									
								
							
							
								
								
								
								
								
									
									
								
							
						
						
									
										3
									
								
								xlsx.js
									
									
									
									
									
								
							| @ -9169,6 +9169,9 @@ function write_ws_xml(idx, opts, wb, rels) { | ||||
| 	o[o.length] = (writextag('sheetPr', null, {'codeName': escapexml(wb.SheetNames[idx])})); | ||||
| 	o[o.length] = (writextag('dimension', null, {'ref': ref})); | ||||
| 
 | ||||
| 	/* TODO: store in WB, process styles */ | ||||
| 	if(opts.sheetFormat) o[o.length] = (writextag('sheetFormatPr', null, {defaultRowHeight:opts.sheetFormat.defaultRowHeight||'16', baseColWidth:opts.sheetFormat.baseColWidth||'10' })) | ||||
| 
 | ||||
| 	if(ws['!cols'] !== undefined && ws['!cols'].length > 0) o[o.length] = (write_ws_xml_cols(ws, ws['!cols'])); | ||||
| 	o[sidx = o.length] = '<sheetData/>'; | ||||
| 	ws['!links'] = []; | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user