Hello...I'm trying to add a PNG file to my export excel document. Here is the code I'm using to try and do it. Is it possible to even do this? Am I doing anything wrong in my code? This is the click even to a button in my own react component that I use to wrap the kendo ExportExcel library.
exportToExcel = async () => {
if (this.excelExportRef.current) {
const workbook = this.excelExportRef.current.workbookOptions();
if (this.props.pngImage) {
workbook.sheets[0].images = [
{
name: 'pngImage',
src: this.props.pngImage,
position: {
type: 'twoCellAnchor',
from: { row: this.props.tableData.length + 10, col: 4 },
to: { row: this.props.tableData.length + 60, col: 10 }
}
}
];
}
}
this.excelExportRef.current.save(workbook);
}