sheetjs/bits/54_drawing.js
SheetJS e4a66516e4 remove flow array comment workarounds
- XLSB use #REF! for unsupported defined name ref (fixes #3059 h/t @NenadC2)
2024-02-02 01:52:14 -05:00

21 lines
672 B
JavaScript

/* 20.5 DrawingML - SpreadsheetML Drawing */
/* 20.5.2.35 wsDr CT_Drawing */
function parse_drawing(data, rels/*:any*/) {
if(!data) return "??";
/*
Chartsheet Drawing:
- 20.5.2.35 wsDr CT_Drawing
- 20.5.2.1 absoluteAnchor CT_AbsoluteAnchor
- 20.5.2.16 graphicFrame CT_GraphicalObjectFrame
- 20.1.2.2.16 graphic CT_GraphicalObject
- 20.1.2.2.17 graphicData CT_GraphicalObjectData
- chart reference
the actual type is based on the URI of the graphicData
TODO: handle embedded charts and other types of graphics
*/
var id = (data.match(/<c:chart [^<>]*r:id="([^<>"]*)"/)||["",""])[1];
return rels['!id'][id].Target;
}