This project has moved and is read-only. For the latest updates, please go here.

Insert Objects onto a specific row/column in EPPlus

Dec 9, 2010 at 3:08 AM

Hi, is there a way for inserting objects as an icon in Excel using EPPlus?

I currently have the following code for inserting screenshots onto a specific row/column already:

ExcelPicture ScreenshotSave = saveSheet.Drawings.AddPicture("Screenshot " + (row - 1) + Controls.Analytics.glbDate, bmpScreenshot);
                    ScreenshotSave.SetSize(2);
                    ScreenshotSave.SetPosition((row - 1), 1, 4, 1);

Manually, you can do it by clicking Insert>Object, select Create from File, and checking Display as an Icon. Assuming you've clicked on the row/column where you'd like it to be beforehand, it should be placed there as expected and will have the =EMBED("Worksheet","") function as its code.

Is there a way in EPPlus that it will retrieve the location of the file and do the embedding similar to what I'm doing with the screenshots?

Thanks!


 

Dec 9, 2010 at 9:04 AM

Hi,

No, there is no way to insert embedded objects yet. That is still on the TODO list.

Jan