Skip to content

Commit 1ca49a5

Browse files
authored
add display property to XLSX hyperlinks (#2791)
Resolves import bug in Google Sheets
1 parent 81b231d commit 1ca49a5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

bits/67_wsxml.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,10 @@ function write_ws_xml_cell(cell/*:Cell*/, ref, ws, opts/*::, idx, wb*/)/*:string
299299
var ff = cell.F && cell.F.slice(0, ref.length) == ref ? {t:"array", ref:cell.F} : null;
300300
v = writextag('f', escapexml(cell.f), ff) + (cell.v != null ? v : "");
301301
}
302-
if(cell.l) ws['!links'].push([ref, cell.l]);
302+
if(cell.l) {
303+
cell.l.display = escapexml(vv);
304+
ws['!links'].push([ref, cell.l]);
305+
}
303306
if(cell.D) o.cm = 1;
304307
return writextag('c', v, o);
305308
}
@@ -609,6 +612,7 @@ function write_ws_xml(idx/*:number*/, opts, wb/*:Workbook*/, rels)/*:string*/ {
609612
}
610613
if((relc = l[1].Target.indexOf("#")) > -1) rel.location = escapexml(l[1].Target.slice(relc+1));
611614
if(l[1].Tooltip) rel.tooltip = escapexml(l[1].Tooltip);
615+
rel.display = l[1].display;
612616
o[o.length] = writextag("hyperlink",null,rel);
613617
});
614618
o[o.length] = "</hyperlinks>";

0 commit comments

Comments
 (0)