diff --git a/lib/msexcel-builder.js b/lib/msexcel-builder.js index bce2587..b673ad7 100644 --- a/lib/msexcel-builder.js +++ b/lib/msexcel-builder.js @@ -138,7 +138,7 @@ }); wb.att('xmlns', 'http://schemas.openxmlformats.org/spreadsheetml/2006/main'); wb.att('xmlns:r', 'http://schemas.openxmlformats.org/officeDocument/2006/relationships'); - wb.ele('fileVersion ', { + wb.ele('fileVersion', { appName: 'xl', lastEdited: '4', lowestEdited: '4', @@ -148,7 +148,7 @@ filterPrivacy: '1', defaultThemeVersion: '124226' }); - wb.ele('bookViews').ele('workbookView ', { + wb.ele('bookViews').ele('workbookView', { xWindow: '0', yWindow: '90', windowWidth: '19200', diff --git a/src/msexcel-builder.coffee b/src/msexcel-builder.coffee index d1a1403..67ed8a4 100644 --- a/src/msexcel-builder.coffee +++ b/src/msexcel-builder.coffee @@ -61,9 +61,9 @@ class XlWorkbook wb = xml.create('workbook',{version:'1.0',encoding:'UTF-8',standalone:true}) wb.att('xmlns','http://schemas.openxmlformats.org/spreadsheetml/2006/main') wb.att('xmlns:r','http://schemas.openxmlformats.org/officeDocument/2006/relationships') - wb.ele('fileVersion ',{appName:'xl',lastEdited:'4',lowestEdited:'4',rupBuild:'4505'}) - wb.ele('workbookPr',{filterPrivacy:'1',defaultThemeVersion:'124226'}) - wb.ele('bookViews').ele('workbookView ',{xWindow:'0',yWindow:'90',windowWidth:'19200',windowHeight:'11640'}) + wb.ele('fileVersion',{appName:'xl',lastEdited:'4',lowestEdited:'4',rupBuild:'4505'}) + wb.ele('workbookPr',{filterPrivacy:'1',defaultThemeVersion:'124226'}) + wb.ele('bookViews').ele('workbookView',{xWindow:'0',yWindow:'90',windowWidth:'19200',windowHeight:'11640'}) tmp = wb.ele('sheets') for i in [1..@book.sheets.length] tmp.ele('sheet',{name:@book.sheets[i-1].name,sheetId:''+i,'r:id':'rId'+i}) @@ -72,7 +72,7 @@ class XlWorkbook class XlRels constructor: (@book)-> - + toxml: ()-> rs = xml.create('Relationships',{version:'1.0',encoding:'UTF-8',standalone:true}) rs.att('xmlns','http://schemas.openxmlformats.org/package/2006/relationships')