sheets.drawings.offsetXNumber
The horizontal offset from the anchor cell's top-left corner, in pixels.
Example
<script>
var workbook = new kendo.ooxml.Workbook({
images: {
"icon": {
data: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8/5+hHgAHggJ/PchI7wAAAABJRU5ErkJggg==",
type: "image/png"
}
},
sheets: [
{
drawings: [
{
topLeftCell: "B2",
offsetX: 25,
offsetY: 10,
width: 50,
height: 50,
image: "icon"
}
],
rows: [
{ cells: [ { value: "Product" }, { value: "Icon will be offset 25px right" } ] }
]
}
]
});
workbook.toDataURLAsync().then(function(dataURL) {
kendo.saveAs({
dataURI: dataURL,
fileName: "offset-x-example.xlsx"
});
});
</script>
In this article