From 8f25481a936a23842bad144975c370bedc724aae Mon Sep 17 00:00:00 2001 From: Dustin Seger Date: Mon, 20 Jan 2020 14:02:21 +0100 Subject: [PATCH] Fix header trailing whitespace issue with xml export --- lib/msexcel-builder.js | 4 ++-- src/msexcel-builder.coffee | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) 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')