Adding object images into Excel using EPPlus
<p>I want to add an image to excel object. I added a picture on and now I want to add the object image to the image when I click on it in excel, it will zoom up to me.
like this</p>

<p><a href="http://i.stack.imgur.com/ttl3X.png" rel="nofollow">enter image description here</a></p>

<p>and here is my code:</p>

<pre><code> private void AddImage(ExcelWorksheet oSheet, int rowIndex, int colIndex, string imagePath)
    {
        Image logo = Image.FromFile(imagePath);
        ExcelPicture excelImage = null;
        if (logo != null)
        {
            excelImage = oSheet.Drawings.AddPicture("", logo);
            excelImage.From.Column = colIndex;
            excelImage.From.Row = rowIndex;
            excelImage.SetSize(100, 100);
            // 2x2 px space for better alignment
            excelImage.From.ColumnOff = Pixel2MTU(2);
            excelImage.From.RowOff = Pixel2MTU(2);
        }
    }

    public int Pixel2MTU(int pixels)
    {
        int mtus = pixels * 9525;
        return mtus;
    }
</code></pre>

<p>Thanks.</p>

<p>I desired result is like this</p>

<p><a href="http://i.stack.imgur.com/Rsouw.png" rel="nofollow">enter image description here</a></p>