We are developing Office 365 Excel Add-In using office js version 1.1, we are creating table and inserting data using tablerows , now we need to display images in cells in one of column.
can anyone help how we can achieve that using office js?
We are developing Office 365 Excel Add-In using office js version 1.1, we are creating table and inserting data using tablerows , now we need to display images in cells in one of column.
can anyone help how we can achieve that using office js?
There is a somewhat limited way of doing it using the getSelectedDataAsync API and the ImageCoercuon type. I know that this works on the Desktop but not sure offhand about Office Online, Mac, or iOS. See https://dev.office.com/reference/add-ins/shared/document.setselecteddataasync. To position the image within a cell you will likely need to programmatically select the cell using the ExcelApi (2016+) API paradigm. And unless you know the width and height of the rows and columns, you may need to guesstimate there (or use a very bizzare hack of first setting a chart in place of the desired image, setting its position to be bounded on both sides by the cell, and loading its width and height properties). I'm happy to review your attempt at such code, but it won't be a super straightforward or clean task.
Actual full-fledged support for images is high on our backlo, but not in the product yet.