Skip to content

Commit 515d1c6

Browse files
committed
mini refresh [ci skip]
1 parent 654d6f9 commit 515d1c6

File tree

3 files changed

+22
-6
lines changed

3 files changed

+22
-6
lines changed

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Issues and Questions
4+
url: https://git.sheetjs.com/sheetjs/sheetjs/issues
5+
about: Please report issues to the official code repository.
6+

xlsx.mini.flow.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5829,7 +5829,7 @@ function sheet_to_dbf(ws/*:Worksheet*/, opts/*:WriteOpts*/) {
58295829
var cp = +dbf_reverse_map[/*::String(*/current_codepage/*::)*/] || 0x03;
58305830
h.write_shift(4, 0x00000000 | (cp<<8));
58315831
if(dbf_codepage_map[cp] != +o.codepage) {
5832-
console.error("DBF Unsupported codepage " + current_codepage + ", using 1252");
5832+
if(o.codepage) console.error("DBF Unsupported codepage " + current_codepage + ", using 1252");
58335833
current_codepage = 1252;
58345834
}
58355835

@@ -6096,7 +6096,7 @@ var SYLK = /*#__PURE__*/(function() {
60966096
case 'b': o += cell.v ? "TRUE" : "FALSE"; break;
60976097
case 'e': o += cell.w || cell.v; break;
60986098
case 'd': o += '"' + (cell.w || cell.v) + '"'; break;
6099-
case 's': o += '"' + cell.v.replace(/"/g,"").replace(/;/g, ";;") + '"'; break;
6099+
case 's': o += '"' + (cell.v == null ? "" : String(cell.v)).replace(/"/g,"").replace(/;/g, ";;") + '"'; break;
61006100
}
61016101
return o;
61026102
}
@@ -6817,6 +6817,7 @@ function write_sst_xml(sst/*:SST*/, opts)/*:string*/ {
68176817
else {
68186818
sitag += "<t";
68196819
if(!s.t) s.t = "";
6820+
if(typeof s.t !== "string") s.t = String(s.t);
68206821
if(s.t.match(straywsregex)) sitag += ' xml:space="preserve"';
68216822
sitag += ">" + escapexml(s.t) + "</t>";
68226823
}
@@ -8639,7 +8640,10 @@ function write_ws_xml_cell(cell/*:Cell*/, ref, ws, opts/*::, idx, wb*/)/*:string
86398640
var ff = cell.F && cell.F.slice(0, ref.length) == ref ? {t:"array", ref:cell.F} : null;
86408641
v = writextag('f', escapexml(cell.f), ff) + (cell.v != null ? v : "");
86418642
}
8642-
if(cell.l) ws['!links'].push([ref, cell.l]);
8643+
if(cell.l) {
8644+
cell.l.display = escapexml(vv);
8645+
ws['!links'].push([ref, cell.l]);
8646+
}
86438647
if(cell.D) o.cm = 1;
86448648
return writextag('c', v, o);
86458649
}
@@ -8949,6 +8953,7 @@ function write_ws_xml(idx/*:number*/, opts, wb/*:Workbook*/, rels)/*:string*/ {
89498953
}
89508954
if((relc = l[1].Target.indexOf("#")) > -1) rel.location = escapexml(l[1].Target.slice(relc+1));
89518955
if(l[1].Tooltip) rel.tooltip = escapexml(l[1].Tooltip);
8956+
rel.display = l[1].display;
89528957
o[o.length] = writextag("hyperlink",null,rel);
89538958
});
89548959
o[o.length] = "</hyperlinks>";

xlsx.mini.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5743,7 +5743,7 @@ function sheet_to_dbf(ws, opts) {
57435743
var cp = +dbf_reverse_map[current_codepage] || 0x03;
57445744
h.write_shift(4, 0x00000000 | (cp<<8));
57455745
if(dbf_codepage_map[cp] != +o.codepage) {
5746-
console.error("DBF Unsupported codepage " + current_codepage + ", using 1252");
5746+
if(o.codepage) console.error("DBF Unsupported codepage " + current_codepage + ", using 1252");
57475747
current_codepage = 1252;
57485748
}
57495749

@@ -6010,7 +6010,7 @@ var SYLK = (function() {
60106010
case 'b': o += cell.v ? "TRUE" : "FALSE"; break;
60116011
case 'e': o += cell.w || cell.v; break;
60126012
case 'd': o += '"' + (cell.w || cell.v) + '"'; break;
6013-
case 's': o += '"' + cell.v.replace(/"/g,"").replace(/;/g, ";;") + '"'; break;
6013+
case 's': o += '"' + (cell.v == null ? "" : String(cell.v)).replace(/"/g,"").replace(/;/g, ";;") + '"'; break;
60146014
}
60156015
return o;
60166016
}
@@ -6731,6 +6731,7 @@ function write_sst_xml(sst, opts) {
67316731
else {
67326732
sitag += "<t";
67336733
if(!s.t) s.t = "";
6734+
if(typeof s.t !== "string") s.t = String(s.t);
67346735
if(s.t.match(straywsregex)) sitag += ' xml:space="preserve"';
67356736
sitag += ">" + escapexml(s.t) + "</t>";
67366737
}
@@ -8553,7 +8554,10 @@ function write_ws_xml_cell(cell, ref, ws, opts) {
85538554
var ff = cell.F && cell.F.slice(0, ref.length) == ref ? {t:"array", ref:cell.F} : null;
85548555
v = writextag('f', escapexml(cell.f), ff) + (cell.v != null ? v : "");
85558556
}
8556-
if(cell.l) ws['!links'].push([ref, cell.l]);
8557+
if(cell.l) {
8558+
cell.l.display = escapexml(vv);
8559+
ws['!links'].push([ref, cell.l]);
8560+
}
85578561
if(cell.D) o.cm = 1;
85588562
return writextag('c', v, o);
85598563
}
@@ -8863,6 +8867,7 @@ ws['!links'].forEach(function(l) {
88638867
}
88648868
if((relc = l[1].Target.indexOf("#")) > -1) rel.location = escapexml(l[1].Target.slice(relc+1));
88658869
if(l[1].Tooltip) rel.tooltip = escapexml(l[1].Tooltip);
8870+
rel.display = l[1].display;
88668871
o[o.length] = writextag("hyperlink",null,rel);
88678872
});
88688873
o[o.length] = "</hyperlinks>";

0 commit comments

Comments
 (0)