forked from sheetjs/sheetjs
		
	add display property to XLSX hyperlinks (#2791)
Resolves import bug in Google Sheets
This commit is contained in:
		
							parent
							
								
									81b231d866
								
							
						
					
					
						commit
						1ca49a50bd
					
				| @ -299,7 +299,10 @@ function write_ws_xml_cell(cell/*:Cell*/, ref, ws, opts/*::, idx, wb*/)/*:string | ||||
| 		var ff = cell.F && cell.F.slice(0, ref.length) == ref ? {t:"array", ref:cell.F} : null; | ||||
| 		v = writextag('f', escapexml(cell.f), ff) + (cell.v != null ? v : ""); | ||||
| 	} | ||||
| 	if(cell.l) ws['!links'].push([ref, cell.l]); | ||||
| 	if(cell.l) { | ||||
| 		cell.l.display = escapexml(vv); | ||||
| 		ws['!links'].push([ref, cell.l]); | ||||
| 	} | ||||
| 	if(cell.D) o.cm = 1; | ||||
| 	return writextag('c', v, o); | ||||
| } | ||||
| @ -609,6 +612,7 @@ function write_ws_xml(idx/*:number*/, opts, wb/*:Workbook*/, rels)/*:string*/ { | ||||
| 			} | ||||
| 			if((relc = l[1].Target.indexOf("#")) > -1) rel.location = escapexml(l[1].Target.slice(relc+1)); | ||||
| 			if(l[1].Tooltip) rel.tooltip = escapexml(l[1].Tooltip); | ||||
| 			rel.display = l[1].display; | ||||
| 			o[o.length] = writextag("hyperlink",null,rel); | ||||
| 		}); | ||||
| 		o[o.length] = "</hyperlinks>"; | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user