diff --git a/bits/77_wbxml.js b/bits/77_wbxml.js
index ba48dfe..d94c514 100644
--- a/bits/77_wbxml.js
+++ b/bits/77_wbxml.js
@@ -154,24 +154,20 @@ function write_wb_xml(wb, opts) {
for(var i = 0; i != wb.SheetNames.length; ++i) {
var sheetName = wb.SheetNames[i];
var sheet = wb.Sheets[sheetName]
- if (sheet['!printHeader'])
- var range = "'" + sheetName + "'!" + sheet['!printHeader'];
- console.log("!!!!"+range)
+ if (sheet['!printHeader']) {
+ var printHeader = sheet['!printHeader'];
+
+ var range = "'" + sheetName + "'!$" + printHeader[0] + ":$" + printHeader[1];
+
o[o.length] = (writextag('definedName', range, {
"name":"_xlnm.Print_Titles",
localSheetId : ''+i
}))
+ }
}
o[o.length] = '';
}
-
-
-//
-// Sheet1!$1:$1
-// Sheet2!$1:$2
-//
-
if(o.length>2){ o[o.length] = ''; o[1]=o[1].replace("/>",">"); }
return o.join("");
}
diff --git a/package.json b/package.json
index 1782592..6c14170 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "xlsx-style",
- "version": "0.8.11",
+ "version": "0.8.13",
"author": "sheetjs",
"description": "Excel (XLSB/XLSX/XLSM/XLS/XML) and ODS spreadsheet parser and writer (extended to enable read/write of cell formats with xlsx files)",
"keywords": [ "excel", "xls", "xlsx", "xlsb", "xlsm", "ods", "office", "spreadsheet" ],
diff --git a/tests/test-acid.js b/tests/test-acid.js
index 4ac7f48..4694de2 100644
--- a/tests/test-acid.js
+++ b/tests/test-acid.js
@@ -1,4 +1,4 @@
-var X = require('./');
+var X = require('../');
var opts = { cellNF: true,
type: 'file',
cellHTML: true,
diff --git a/tests/test-ampersand.js b/tests/test-ampersand.js
deleted file mode 100644
index bc7a4a2..0000000
--- a/tests/test-ampersand.js
+++ /dev/null
@@ -1,715 +0,0 @@
-var XLSX = require('../.');
-
-var JSZip = require('jszip');
-var fs = require('fs');
-var cheerio = require('cheerio');
-
-var assert = require('assert');
-
-function JSDateToExcelDate(inDate) {
- return 25569.0 + ((inDate.getTime() - (inDate.getTimezoneOffset() * 60 * 1000)) / (1000 * 60 * 60 * 24));
-}
-
-var defaultCellStyle = { font: { name: "Verdana", sz: 11, color: "FF00FF88"}, fill: {fgColor: {rgb: "FFFFAA00"}}};
-
-// test to see if everything on the left equals its counterpart on the right
-// but the right hand object may have other attributes which we might not care about
-function basicallyEquals(left, right) {
- if (Array.isArray(left) && Array.isArray(right)) {
- for (var i=0; i';
}
-
-
-//
-// Sheet1!$1:$1
-// Sheet2!$1:$2
-//
-
if(o.length>2){ o[o.length] = ''; o[1]=o[1].replace("/>",">"); }
return o.join("");
}