forked from sheetjs/sheetjs
version bump 0.16.9: utf-8 codenames
This commit is contained in:
parent
f7835d67b2
commit
20212e1cc2
10
README.md
10
README.md
@ -1093,9 +1093,13 @@ In addition to the base sheet keys, worksheets also add:
|
||||
will write all cells in the merge range if they exist, so be sure that only
|
||||
the first cell (upper-left) in the range is set.
|
||||
|
||||
- `ws['!outline']`: configure how outlines should behave.
|
||||
Example: `{above: true}` - equivalent of unchecking the Excel option "Summary rows below detail".
|
||||
`{left: true}` - equivalent of unchecking the Excel option "Summary option to the right of detail."
|
||||
- `ws['!outline']`: configure how outlines should behave. Options default to
|
||||
the default settings in Excel 2019:
|
||||
|
||||
| key | Excel feature | default |
|
||||
|:----------|:----------------------------------------------|:--------|
|
||||
| `above` | Uncheck "Summary rows below detail" | `false` |
|
||||
| `left` | Uncheck "Summary rows to the right of detail" | `false` |
|
||||
|
||||
- `ws['!protect']`: object of write sheet protection properties. The `password`
|
||||
key specifies the password for formats that support password-protected sheets
|
||||
|
@ -1 +1 @@
|
||||
XLSX.version = '0.16.8';
|
||||
XLSX.version = '0.16.9';
|
||||
|
@ -102,7 +102,7 @@ function write_ws_xml_merges(merges/*:Array<Range>*/)/*:string*/ {
|
||||
function parse_ws_xml_sheetpr(sheetPr/*:string*/, s, wb/*:WBWBProps*/, idx/*:number*/) {
|
||||
var data = parsexmltag(sheetPr);
|
||||
if(!wb.Sheets[idx]) wb.Sheets[idx] = {};
|
||||
if(data.codeName) wb.Sheets[idx].CodeName = data.codeName;
|
||||
if(data.codeName) wb.Sheets[idx].CodeName = unescapexml(utf8read(data.codeName));
|
||||
}
|
||||
function write_ws_xml_sheetpr(ws, wb, idx, opts, o) {
|
||||
var needed = false;
|
||||
@ -111,7 +111,7 @@ function write_ws_xml_sheetpr(ws, wb, idx, opts, o) {
|
||||
var cname = wb.SheetNames[idx];
|
||||
try { if(wb.Workbook) cname = wb.Workbook.Sheets[idx].CodeName || cname; } catch(e) {}
|
||||
needed = true;
|
||||
props.codeName = escapexml(cname);
|
||||
props.codeName = utf8write(escapexml(cname));
|
||||
}
|
||||
|
||||
if(ws && ws["!outline"]) {
|
||||
|
@ -382,7 +382,7 @@ var parse_content_xml = (function() {
|
||||
case 'line-break': break; // 6.1.5 <text:line-break>
|
||||
case 'span': break; // 6.1.7 <text:span>
|
||||
case 'p': case '文本串': // 5.1.3 <text:p>
|
||||
if(['master-styles'].indexOf(state[satte.length-1][0]) > -1) break;
|
||||
if(['master-styles'].indexOf(state[state.length-1][0]) > -1) break;
|
||||
if(Rn[1]==='/' && (!ctag || !ctag['string-value'])) {
|
||||
var ptp = parse_text_p(str.slice(textpidx,Rn.index), textptag);
|
||||
textp = (textp.length > 0 ? textp + "\n" : "") + ptp[0];
|
||||
|
14
dist/xlsx.core.min.js
generated
vendored
14
dist/xlsx.core.min.js
generated
vendored
File diff suppressed because one or more lines are too long
2
dist/xlsx.core.min.map
generated
vendored
2
dist/xlsx.core.min.map
generated
vendored
File diff suppressed because one or more lines are too long
18
dist/xlsx.extendscript.js
generated
vendored
18
dist/xlsx.extendscript.js
generated
vendored
@ -9161,7 +9161,7 @@ module.exports = ZStream;
|
||||
/*global global, exports, module, require:false, process:false, Buffer:false, ArrayBuffer:false */
|
||||
var XLSX = {};
|
||||
function make_xlsx_lib(XLSX){
|
||||
XLSX.version = '0.16.8';
|
||||
XLSX.version = '0.16.9';
|
||||
var current_codepage = 1200, current_ansi = 1252;
|
||||
/*global cptable:true, window */
|
||||
if(typeof module !== "undefined" && typeof require !== 'undefined') {
|
||||
@ -22462,7 +22462,7 @@ function write_ws_xml_merges(merges) {
|
||||
function parse_ws_xml_sheetpr(sheetPr, s, wb, idx) {
|
||||
var data = parsexmltag(sheetPr);
|
||||
if(!wb.Sheets[idx]) wb.Sheets[idx] = {};
|
||||
if(data.codeName) wb.Sheets[idx].CodeName = data.codeName;
|
||||
if(data.codeName) wb.Sheets[idx].CodeName = unescapexml(utf8read(data.codeName));
|
||||
}
|
||||
function write_ws_xml_sheetpr(ws, wb, idx, opts, o) {
|
||||
var needed = false;
|
||||
@ -22471,7 +22471,14 @@ function write_ws_xml_sheetpr(ws, wb, idx, opts, o) {
|
||||
var cname = wb.SheetNames[idx];
|
||||
try { if(wb.Workbook) cname = wb.Workbook.Sheets[idx].CodeName || cname; } catch(e) {}
|
||||
needed = true;
|
||||
props.codeName = escapexml(cname);
|
||||
props.codeName = utf8write(escapexml(cname));
|
||||
}
|
||||
|
||||
if(ws && ws["!outline"]) {
|
||||
var outlineprops = {summaryBelow:1, summaryRight:1};
|
||||
if(ws["!outline"].above) outlineprops.summaryBelow = 0;
|
||||
if(ws["!outline"].left) outlineprops.summaryRight = 0;
|
||||
payload = (payload||"") + writextag('outlinePr', null, outlineprops);
|
||||
}
|
||||
|
||||
if(!needed && !payload) return;
|
||||
@ -22648,7 +22655,7 @@ function write_ws_xml_cell(cell, ref, ws, opts) {
|
||||
}
|
||||
|
||||
var parse_ws_xml_data = (function() {
|
||||
var cellregex = /<(?:\w+:)?c[ >]/, rowregex = /<\/(?:\w+:)?row>/;
|
||||
var cellregex = /<(?:\w+:)?c[ \/>]/, rowregex = /<\/(?:\w+:)?row>/;
|
||||
var rregex = /r=["']([^"']*)["']/, isregex = /<(?:\w+:)?is>([\S\s]*?)<\/(?:\w+:)?is>/;
|
||||
var refregex = /ref=["']([^"']*)["']/;
|
||||
var match_v = matchtag("v"), match_f = matchtag("f");
|
||||
@ -29055,6 +29062,7 @@ var parse_content_xml = (function() {
|
||||
case 'scripts': // 3.12 <office:scripts>
|
||||
case 'styles': // TODO <office:styles>
|
||||
case 'font-face-decls': // 3.14 <office:font-face-decls>
|
||||
case 'master-styles': //3.15.4 <office:master-styles> -- relevant for FODS
|
||||
if(Rn[1]==='/'){if((tmp=state.pop())[0]!==Rn[3]) throw "Bad state: "+tmp;}
|
||||
else if(Rn[0].charAt(Rn[0].length-2) !== '/') state.push([Rn[3], true]);
|
||||
break;
|
||||
@ -29121,7 +29129,6 @@ var parse_content_xml = (function() {
|
||||
case 'script': break; // 3.13 <office:script>
|
||||
case 'libraries': break; // TODO: <ooo:libraries>
|
||||
case 'automatic-styles': break; // 3.15.3 <office:automatic-styles>
|
||||
case 'master-styles': break; // TODO: <office:master-styles>
|
||||
|
||||
case 'default-style': // TODO: <style:default-style>
|
||||
case 'page-layout': break; // TODO: <style:page-layout>
|
||||
@ -29218,6 +29225,7 @@ var parse_content_xml = (function() {
|
||||
case 'line-break': break; // 6.1.5 <text:line-break>
|
||||
case 'span': break; // 6.1.7 <text:span>
|
||||
case 'p': case '文本串': // 5.1.3 <text:p>
|
||||
if(['master-styles'].indexOf(state[state.length-1][0]) > -1) break;
|
||||
if(Rn[1]==='/' && (!ctag || !ctag['string-value'])) {
|
||||
var ptp = parse_text_p(str.slice(textpidx,Rn.index), textptag);
|
||||
textp = (textp.length > 0 ? textp + "\n" : "") + ptp[0];
|
||||
|
14
dist/xlsx.full.min.js
generated
vendored
14
dist/xlsx.full.min.js
generated
vendored
File diff suppressed because one or more lines are too long
2
dist/xlsx.full.min.map
generated
vendored
2
dist/xlsx.full.min.map
generated
vendored
File diff suppressed because one or more lines are too long
18
dist/xlsx.js
generated
vendored
18
dist/xlsx.js
generated
vendored
@ -4,7 +4,7 @@
|
||||
/*global global, exports, module, require:false, process:false, Buffer:false, ArrayBuffer:false */
|
||||
var XLSX = {};
|
||||
function make_xlsx_lib(XLSX){
|
||||
XLSX.version = '0.16.8';
|
||||
XLSX.version = '0.16.9';
|
||||
var current_codepage = 1200, current_ansi = 1252;
|
||||
/*global cptable:true, window */
|
||||
if(typeof module !== "undefined" && typeof require !== 'undefined') {
|
||||
@ -13305,7 +13305,7 @@ function write_ws_xml_merges(merges) {
|
||||
function parse_ws_xml_sheetpr(sheetPr, s, wb, idx) {
|
||||
var data = parsexmltag(sheetPr);
|
||||
if(!wb.Sheets[idx]) wb.Sheets[idx] = {};
|
||||
if(data.codeName) wb.Sheets[idx].CodeName = data.codeName;
|
||||
if(data.codeName) wb.Sheets[idx].CodeName = unescapexml(utf8read(data.codeName));
|
||||
}
|
||||
function write_ws_xml_sheetpr(ws, wb, idx, opts, o) {
|
||||
var needed = false;
|
||||
@ -13314,7 +13314,14 @@ function write_ws_xml_sheetpr(ws, wb, idx, opts, o) {
|
||||
var cname = wb.SheetNames[idx];
|
||||
try { if(wb.Workbook) cname = wb.Workbook.Sheets[idx].CodeName || cname; } catch(e) {}
|
||||
needed = true;
|
||||
props.codeName = escapexml(cname);
|
||||
props.codeName = utf8write(escapexml(cname));
|
||||
}
|
||||
|
||||
if(ws && ws["!outline"]) {
|
||||
var outlineprops = {summaryBelow:1, summaryRight:1};
|
||||
if(ws["!outline"].above) outlineprops.summaryBelow = 0;
|
||||
if(ws["!outline"].left) outlineprops.summaryRight = 0;
|
||||
payload = (payload||"") + writextag('outlinePr', null, outlineprops);
|
||||
}
|
||||
|
||||
if(!needed && !payload) return;
|
||||
@ -13491,7 +13498,7 @@ function write_ws_xml_cell(cell, ref, ws, opts) {
|
||||
}
|
||||
|
||||
var parse_ws_xml_data = (function() {
|
||||
var cellregex = /<(?:\w+:)?c[ >]/, rowregex = /<\/(?:\w+:)?row>/;
|
||||
var cellregex = /<(?:\w+:)?c[ \/>]/, rowregex = /<\/(?:\w+:)?row>/;
|
||||
var rregex = /r=["']([^"']*)["']/, isregex = /<(?:\w+:)?is>([\S\s]*?)<\/(?:\w+:)?is>/;
|
||||
var refregex = /ref=["']([^"']*)["']/;
|
||||
var match_v = matchtag("v"), match_f = matchtag("f");
|
||||
@ -19898,6 +19905,7 @@ var parse_content_xml = (function() {
|
||||
case 'scripts': // 3.12 <office:scripts>
|
||||
case 'styles': // TODO <office:styles>
|
||||
case 'font-face-decls': // 3.14 <office:font-face-decls>
|
||||
case 'master-styles': //3.15.4 <office:master-styles> -- relevant for FODS
|
||||
if(Rn[1]==='/'){if((tmp=state.pop())[0]!==Rn[3]) throw "Bad state: "+tmp;}
|
||||
else if(Rn[0].charAt(Rn[0].length-2) !== '/') state.push([Rn[3], true]);
|
||||
break;
|
||||
@ -19964,7 +19972,6 @@ var parse_content_xml = (function() {
|
||||
case 'script': break; // 3.13 <office:script>
|
||||
case 'libraries': break; // TODO: <ooo:libraries>
|
||||
case 'automatic-styles': break; // 3.15.3 <office:automatic-styles>
|
||||
case 'master-styles': break; // TODO: <office:master-styles>
|
||||
|
||||
case 'default-style': // TODO: <style:default-style>
|
||||
case 'page-layout': break; // TODO: <style:page-layout>
|
||||
@ -20061,6 +20068,7 @@ var parse_content_xml = (function() {
|
||||
case 'line-break': break; // 6.1.5 <text:line-break>
|
||||
case 'span': break; // 6.1.7 <text:span>
|
||||
case 'p': case '文本串': // 5.1.3 <text:p>
|
||||
if(['master-styles'].indexOf(state[state.length-1][0]) > -1) break;
|
||||
if(Rn[1]==='/' && (!ctag || !ctag['string-value'])) {
|
||||
var ptp = parse_text_p(str.slice(textpidx,Rn.index), textptag);
|
||||
textp = (textp.length > 0 ? textp + "\n" : "") + ptp[0];
|
||||
|
28
dist/xlsx.min.js
generated
vendored
28
dist/xlsx.min.js
generated
vendored
File diff suppressed because one or more lines are too long
2
dist/xlsx.min.map
generated
vendored
2
dist/xlsx.min.map
generated
vendored
File diff suppressed because one or more lines are too long
8
dist/xlsx.mini.min.js
generated
vendored
8
dist/xlsx.mini.min.js
generated
vendored
File diff suppressed because one or more lines are too long
2
dist/xlsx.mini.min.map
generated
vendored
2
dist/xlsx.mini.min.map
generated
vendored
File diff suppressed because one or more lines are too long
@ -16,6 +16,14 @@ In addition to the base sheet keys, worksheets also add:
|
||||
will write all cells in the merge range if they exist, so be sure that only
|
||||
the first cell (upper-left) in the range is set.
|
||||
|
||||
- `ws['!outline']`: configure how outlines should behave. Options default to
|
||||
the default settings in Excel 2019:
|
||||
|
||||
| key | Excel feature | default |
|
||||
|:----------|:----------------------------------------------|:--------|
|
||||
| `above` | Uncheck "Summary rows below detail" | `false` |
|
||||
| `left` | Uncheck "Summary rows to the right of detail" | `false` |
|
||||
|
||||
- `ws['!protect']`: object of write sheet protection properties. The `password`
|
||||
key specifies the password for formats that support password-protected sheets
|
||||
(XLSX/XLSB/XLS). The writer uses the XOR obfuscation method. The following
|
||||
|
@ -1000,6 +1000,14 @@ In addition to the base sheet keys, worksheets also add:
|
||||
will write all cells in the merge range if they exist, so be sure that only
|
||||
the first cell (upper-left) in the range is set.
|
||||
|
||||
- `ws['!outline']`: configure how outlines should behave. Options default to
|
||||
the default settings in Excel 2019:
|
||||
|
||||
| key | Excel feature | default |
|
||||
|:----------|:----------------------------------------------|:--------|
|
||||
| `above` | Uncheck "Summary rows below detail" | `false` |
|
||||
| `left` | Uncheck "Summary rows to the right of detail" | `false` |
|
||||
|
||||
- `ws['!protect']`: object of write sheet protection properties. The `password`
|
||||
key specifies the password for formats that support password-protected sheets
|
||||
(XLSX/XLSB/XLS). The writer uses the XOR obfuscation method. The following
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xlsx",
|
||||
"version": "0.16.8",
|
||||
"version": "0.16.9",
|
||||
"author": "sheetjs",
|
||||
"description": "SheetJS Spreadsheet data parser and writer",
|
||||
"keywords": [
|
||||
@ -38,6 +38,7 @@
|
||||
"commander": "~2.17.1",
|
||||
"crc-32": "~1.2.0",
|
||||
"exit-on-epipe": "~1.0.1",
|
||||
"fflate": "^0.3.8",
|
||||
"ssf": "~0.11.2",
|
||||
"word": "~0.3.0",
|
||||
"wmf": "~1.0.1"
|
||||
|
18
xlsx.flow.js
18
xlsx.flow.js
@ -4,7 +4,7 @@
|
||||
/*global global, exports, module, require:false, process:false, Buffer:false, ArrayBuffer:false */
|
||||
var XLSX = {};
|
||||
function make_xlsx_lib(XLSX){
|
||||
XLSX.version = '0.16.8';
|
||||
XLSX.version = '0.16.9';
|
||||
var current_codepage = 1200, current_ansi = 1252;
|
||||
/*:: declare var cptable:any; */
|
||||
/*global cptable:true, window */
|
||||
@ -13407,7 +13407,7 @@ function write_ws_xml_merges(merges/*:Array<Range>*/)/*:string*/ {
|
||||
function parse_ws_xml_sheetpr(sheetPr/*:string*/, s, wb/*:WBWBProps*/, idx/*:number*/) {
|
||||
var data = parsexmltag(sheetPr);
|
||||
if(!wb.Sheets[idx]) wb.Sheets[idx] = {};
|
||||
if(data.codeName) wb.Sheets[idx].CodeName = data.codeName;
|
||||
if(data.codeName) wb.Sheets[idx].CodeName = unescapexml(utf8read(data.codeName));
|
||||
}
|
||||
function write_ws_xml_sheetpr(ws, wb, idx, opts, o) {
|
||||
var needed = false;
|
||||
@ -13416,7 +13416,14 @@ function write_ws_xml_sheetpr(ws, wb, idx, opts, o) {
|
||||
var cname = wb.SheetNames[idx];
|
||||
try { if(wb.Workbook) cname = wb.Workbook.Sheets[idx].CodeName || cname; } catch(e) {}
|
||||
needed = true;
|
||||
props.codeName = escapexml(cname);
|
||||
props.codeName = utf8write(escapexml(cname));
|
||||
}
|
||||
|
||||
if(ws && ws["!outline"]) {
|
||||
var outlineprops = {summaryBelow:1, summaryRight:1};
|
||||
if(ws["!outline"].above) outlineprops.summaryBelow = 0;
|
||||
if(ws["!outline"].left) outlineprops.summaryRight = 0;
|
||||
payload = (payload||"") + writextag('outlinePr', null, outlineprops);
|
||||
}
|
||||
|
||||
if(!needed && !payload) return;
|
||||
@ -13593,7 +13600,7 @@ function write_ws_xml_cell(cell/*:Cell*/, ref, ws, opts/*::, idx, wb*/)/*:string
|
||||
}
|
||||
|
||||
var parse_ws_xml_data = (function() {
|
||||
var cellregex = /<(?:\w+:)?c[ >]/, rowregex = /<\/(?:\w+:)?row>/;
|
||||
var cellregex = /<(?:\w+:)?c[ \/>]/, rowregex = /<\/(?:\w+:)?row>/;
|
||||
var rregex = /r=["']([^"']*)["']/, isregex = /<(?:\w+:)?is>([\S\s]*?)<\/(?:\w+:)?is>/;
|
||||
var refregex = /ref=["']([^"']*)["']/;
|
||||
var match_v = matchtag("v"), match_f = matchtag("f");
|
||||
@ -20016,6 +20023,7 @@ var parse_content_xml = (function() {
|
||||
case 'scripts': // 3.12 <office:scripts>
|
||||
case 'styles': // TODO <office:styles>
|
||||
case 'font-face-decls': // 3.14 <office:font-face-decls>
|
||||
case 'master-styles': //3.15.4 <office:master-styles> -- relevant for FODS
|
||||
if(Rn[1]==='/'){if((tmp=state.pop())[0]!==Rn[3]) throw "Bad state: "+tmp;}
|
||||
else if(Rn[0].charAt(Rn[0].length-2) !== '/') state.push([Rn[3], true]);
|
||||
break;
|
||||
@ -20082,7 +20090,6 @@ var parse_content_xml = (function() {
|
||||
case 'script': break; // 3.13 <office:script>
|
||||
case 'libraries': break; // TODO: <ooo:libraries>
|
||||
case 'automatic-styles': break; // 3.15.3 <office:automatic-styles>
|
||||
case 'master-styles': break; // TODO: <office:master-styles>
|
||||
|
||||
case 'default-style': // TODO: <style:default-style>
|
||||
case 'page-layout': break; // TODO: <style:page-layout>
|
||||
@ -20179,6 +20186,7 @@ var parse_content_xml = (function() {
|
||||
case 'line-break': break; // 6.1.5 <text:line-break>
|
||||
case 'span': break; // 6.1.7 <text:span>
|
||||
case 'p': case '文本串': // 5.1.3 <text:p>
|
||||
if(['master-styles'].indexOf(state[state.length-1][0]) > -1) break;
|
||||
if(Rn[1]==='/' && (!ctag || !ctag['string-value'])) {
|
||||
var ptp = parse_text_p(str.slice(textpidx,Rn.index), textptag);
|
||||
textp = (textp.length > 0 ? textp + "\n" : "") + ptp[0];
|
||||
|
18
xlsx.js
generated
18
xlsx.js
generated
@ -4,7 +4,7 @@
|
||||
/*global global, exports, module, require:false, process:false, Buffer:false, ArrayBuffer:false */
|
||||
var XLSX = {};
|
||||
function make_xlsx_lib(XLSX){
|
||||
XLSX.version = '0.16.8';
|
||||
XLSX.version = '0.16.9';
|
||||
var current_codepage = 1200, current_ansi = 1252;
|
||||
/*global cptable:true, window */
|
||||
if(typeof module !== "undefined" && typeof require !== 'undefined') {
|
||||
@ -13305,7 +13305,7 @@ function write_ws_xml_merges(merges) {
|
||||
function parse_ws_xml_sheetpr(sheetPr, s, wb, idx) {
|
||||
var data = parsexmltag(sheetPr);
|
||||
if(!wb.Sheets[idx]) wb.Sheets[idx] = {};
|
||||
if(data.codeName) wb.Sheets[idx].CodeName = data.codeName;
|
||||
if(data.codeName) wb.Sheets[idx].CodeName = unescapexml(utf8read(data.codeName));
|
||||
}
|
||||
function write_ws_xml_sheetpr(ws, wb, idx, opts, o) {
|
||||
var needed = false;
|
||||
@ -13314,7 +13314,14 @@ function write_ws_xml_sheetpr(ws, wb, idx, opts, o) {
|
||||
var cname = wb.SheetNames[idx];
|
||||
try { if(wb.Workbook) cname = wb.Workbook.Sheets[idx].CodeName || cname; } catch(e) {}
|
||||
needed = true;
|
||||
props.codeName = escapexml(cname);
|
||||
props.codeName = utf8write(escapexml(cname));
|
||||
}
|
||||
|
||||
if(ws && ws["!outline"]) {
|
||||
var outlineprops = {summaryBelow:1, summaryRight:1};
|
||||
if(ws["!outline"].above) outlineprops.summaryBelow = 0;
|
||||
if(ws["!outline"].left) outlineprops.summaryRight = 0;
|
||||
payload = (payload||"") + writextag('outlinePr', null, outlineprops);
|
||||
}
|
||||
|
||||
if(!needed && !payload) return;
|
||||
@ -13491,7 +13498,7 @@ function write_ws_xml_cell(cell, ref, ws, opts) {
|
||||
}
|
||||
|
||||
var parse_ws_xml_data = (function() {
|
||||
var cellregex = /<(?:\w+:)?c[ >]/, rowregex = /<\/(?:\w+:)?row>/;
|
||||
var cellregex = /<(?:\w+:)?c[ \/>]/, rowregex = /<\/(?:\w+:)?row>/;
|
||||
var rregex = /r=["']([^"']*)["']/, isregex = /<(?:\w+:)?is>([\S\s]*?)<\/(?:\w+:)?is>/;
|
||||
var refregex = /ref=["']([^"']*)["']/;
|
||||
var match_v = matchtag("v"), match_f = matchtag("f");
|
||||
@ -19898,6 +19905,7 @@ var parse_content_xml = (function() {
|
||||
case 'scripts': // 3.12 <office:scripts>
|
||||
case 'styles': // TODO <office:styles>
|
||||
case 'font-face-decls': // 3.14 <office:font-face-decls>
|
||||
case 'master-styles': //3.15.4 <office:master-styles> -- relevant for FODS
|
||||
if(Rn[1]==='/'){if((tmp=state.pop())[0]!==Rn[3]) throw "Bad state: "+tmp;}
|
||||
else if(Rn[0].charAt(Rn[0].length-2) !== '/') state.push([Rn[3], true]);
|
||||
break;
|
||||
@ -19964,7 +19972,6 @@ var parse_content_xml = (function() {
|
||||
case 'script': break; // 3.13 <office:script>
|
||||
case 'libraries': break; // TODO: <ooo:libraries>
|
||||
case 'automatic-styles': break; // 3.15.3 <office:automatic-styles>
|
||||
case 'master-styles': break; // TODO: <office:master-styles>
|
||||
|
||||
case 'default-style': // TODO: <style:default-style>
|
||||
case 'page-layout': break; // TODO: <style:page-layout>
|
||||
@ -20061,6 +20068,7 @@ var parse_content_xml = (function() {
|
||||
case 'line-break': break; // 6.1.5 <text:line-break>
|
||||
case 'span': break; // 6.1.7 <text:span>
|
||||
case 'p': case '文本串': // 5.1.3 <text:p>
|
||||
if(['master-styles'].indexOf(state[state.length-1][0]) > -1) break;
|
||||
if(Rn[1]==='/' && (!ctag || !ctag['string-value'])) {
|
||||
var ptp = parse_text_p(str.slice(textpidx,Rn.index), textptag);
|
||||
textp = (textp.length > 0 ? textp + "\n" : "") + ptp[0];
|
||||
|
@ -4,7 +4,7 @@
|
||||
/*global global, exports, module, require:false, process:false, Buffer:false, ArrayBuffer:false */
|
||||
var XLSX = {};
|
||||
function make_xlsx_lib(XLSX){
|
||||
XLSX.version = '0.16.8';
|
||||
XLSX.version = '0.16.9';
|
||||
var current_codepage = 1200, current_ansi = 1252;
|
||||
|
||||
var VALID_ANSI = [ 874, 932, 936, 949, 950 ];
|
||||
@ -7328,7 +7328,7 @@ function write_ws_xml_merges(merges/*:Array<Range>*/)/*:string*/ {
|
||||
function parse_ws_xml_sheetpr(sheetPr/*:string*/, s, wb/*:WBWBProps*/, idx/*:number*/) {
|
||||
var data = parsexmltag(sheetPr);
|
||||
if(!wb.Sheets[idx]) wb.Sheets[idx] = {};
|
||||
if(data.codeName) wb.Sheets[idx].CodeName = data.codeName;
|
||||
if(data.codeName) wb.Sheets[idx].CodeName = unescapexml(utf8read(data.codeName));
|
||||
}
|
||||
function write_ws_xml_sheetpr(ws, wb, idx, opts, o) {
|
||||
var needed = false;
|
||||
@ -7337,7 +7337,14 @@ function write_ws_xml_sheetpr(ws, wb, idx, opts, o) {
|
||||
var cname = wb.SheetNames[idx];
|
||||
try { if(wb.Workbook) cname = wb.Workbook.Sheets[idx].CodeName || cname; } catch(e) {}
|
||||
needed = true;
|
||||
props.codeName = escapexml(cname);
|
||||
props.codeName = utf8write(escapexml(cname));
|
||||
}
|
||||
|
||||
if(ws && ws["!outline"]) {
|
||||
var outlineprops = {summaryBelow:1, summaryRight:1};
|
||||
if(ws["!outline"].above) outlineprops.summaryBelow = 0;
|
||||
if(ws["!outline"].left) outlineprops.summaryRight = 0;
|
||||
payload = (payload||"") + writextag('outlinePr', null, outlineprops);
|
||||
}
|
||||
|
||||
if(!needed && !payload) return;
|
||||
@ -7514,7 +7521,7 @@ function write_ws_xml_cell(cell/*:Cell*/, ref, ws, opts/*::, idx, wb*/)/*:string
|
||||
}
|
||||
|
||||
var parse_ws_xml_data = (function() {
|
||||
var cellregex = /<(?:\w+:)?c[ >]/, rowregex = /<\/(?:\w+:)?row>/;
|
||||
var cellregex = /<(?:\w+:)?c[ \/>]/, rowregex = /<\/(?:\w+:)?row>/;
|
||||
var rregex = /r=["']([^"']*)["']/, isregex = /<(?:\w+:)?is>([\S\s]*?)<\/(?:\w+:)?is>/;
|
||||
var refregex = /ref=["']([^"']*)["']/;
|
||||
var match_v = matchtag("v"), match_f = matchtag("f");
|
||||
|
15
xlsx.mini.js
15
xlsx.mini.js
@ -4,7 +4,7 @@
|
||||
/*global global, exports, module, require:false, process:false, Buffer:false, ArrayBuffer:false */
|
||||
var XLSX = {};
|
||||
function make_xlsx_lib(XLSX){
|
||||
XLSX.version = '0.16.8';
|
||||
XLSX.version = '0.16.9';
|
||||
var current_codepage = 1200, current_ansi = 1252;
|
||||
|
||||
var VALID_ANSI = [ 874, 932, 936, 949, 950 ];
|
||||
@ -7237,7 +7237,7 @@ function write_ws_xml_merges(merges) {
|
||||
function parse_ws_xml_sheetpr(sheetPr, s, wb, idx) {
|
||||
var data = parsexmltag(sheetPr);
|
||||
if(!wb.Sheets[idx]) wb.Sheets[idx] = {};
|
||||
if(data.codeName) wb.Sheets[idx].CodeName = data.codeName;
|
||||
if(data.codeName) wb.Sheets[idx].CodeName = unescapexml(utf8read(data.codeName));
|
||||
}
|
||||
function write_ws_xml_sheetpr(ws, wb, idx, opts, o) {
|
||||
var needed = false;
|
||||
@ -7246,7 +7246,14 @@ function write_ws_xml_sheetpr(ws, wb, idx, opts, o) {
|
||||
var cname = wb.SheetNames[idx];
|
||||
try { if(wb.Workbook) cname = wb.Workbook.Sheets[idx].CodeName || cname; } catch(e) {}
|
||||
needed = true;
|
||||
props.codeName = escapexml(cname);
|
||||
props.codeName = utf8write(escapexml(cname));
|
||||
}
|
||||
|
||||
if(ws && ws["!outline"]) {
|
||||
var outlineprops = {summaryBelow:1, summaryRight:1};
|
||||
if(ws["!outline"].above) outlineprops.summaryBelow = 0;
|
||||
if(ws["!outline"].left) outlineprops.summaryRight = 0;
|
||||
payload = (payload||"") + writextag('outlinePr', null, outlineprops);
|
||||
}
|
||||
|
||||
if(!needed && !payload) return;
|
||||
@ -7423,7 +7430,7 @@ function write_ws_xml_cell(cell, ref, ws, opts) {
|
||||
}
|
||||
|
||||
var parse_ws_xml_data = (function() {
|
||||
var cellregex = /<(?:\w+:)?c[ >]/, rowregex = /<\/(?:\w+:)?row>/;
|
||||
var cellregex = /<(?:\w+:)?c[ \/>]/, rowregex = /<\/(?:\w+:)?row>/;
|
||||
var rregex = /r=["']([^"']*)["']/, isregex = /<(?:\w+:)?is>([\S\s]*?)<\/(?:\w+:)?is>/;
|
||||
var refregex = /ref=["']([^"']*)["']/;
|
||||
var match_v = matchtag("v"), match_f = matchtag("f");
|
||||
|
Loading…
Reference in New Issue
Block a user