Interface: IFRangeSheetDrawingMixin
Extended by
Methods
insertCellImageAsync()
insertCellImageAsync(file): Promise<boolean>
Inserts an image into the current cell.
Parameters
Parameter | Type | Description |
---|---|---|
file | string | File | File or URL string |
Returns
Promise
<boolean
>
True if the image is inserted successfully, otherwise false
Example
const fWorkbook = univerAPI.getActiveWorkbook();
const fWorksheet = fWorkbook.getActiveSheet();
// Insert an image into the cell A10
const fRange = fWorksheet.getRange('A10');
const result = await fRange.insertCellImageAsync('https://avatars.githubusercontent.com/u/61444807?s=48&v=4');
console.log(result);