We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Add image to spreadsheet at specific column & row

I haven't been able to find what I'm looking for in terms of adding an image to a spreadsheet on loadComplete(args).
I tried utilizing code such as: this.XLEdit.updateCellValue({ rowIndex: 31, colIndex: 0 }, URL(new url, "../images/phLogo.png"));
to no 

I've tried by utilizing a button in the spreadsheet via:
                    <e-cell-type range="A32">
                        <e-settings typeof="button" style="background-image: url('/images/phLogo.png')" datasourcerange="A32" class="none"></e-settings>

That class is being set by ej.spreadsheet.min.js and I'm trying to avoid going in and editing it because doing so is so resource intensive. Is there some other approach I can utilize? I'll also say that using the 2nd approach I do get a button that displays but it also displays the button name in 7 out of the next 10 or so cells in the A column.

1 Reply

SK Shanmugaraja K Syncfusion Team July 26, 2017 09:23 AM UTC

Hi Jacob, 
Thanks for using Syncfusion products. 
We have checked your requirement, and we suspect that your trying to add picture in Spreadsheet. We suggest you to use setPicture method to achieve this requirement. 
        $(function () { 
               loadComplete: "loadComplete" 
        function loadComplete(args) { 
            this.XLShape.setPicture("B2", "\ladybug.png", 400, 240); 
We have created simple sample with these code example and the same can be downloaded from the below link, 
Please try the above sample and check whether it fulfilling your requirement, if not please get back to us with more details. 
Shanmugaraja K  

Live Chat Icon For mobile
Up arrow icon