Click here to Skip to main content
11,920,641 members (57,905 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# XML MS-Excel .NET4 , +

I need to add image at a particular cell location in an Excel sheet. I an using OpenXML approach for this.
Can anyone suggest me how to achieve this ?

For example, i need to put an image at cell "D5".

Thanks and Regards,
YKK Reddy
Posted 30-Jan-12 2:41am
YKK Reddy1.7K
Edited 30-Jan-12 2:42am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

YKK Reddy 1-Feb-12 3:23am

In the above links, first image is placed at the starting of the excel sheet.
Second image to the first image's left and third image is placed at first image's bottom.

Since the pixels and resolutions of the images are fixed, it is hardcoded.
But in my case, the image is dynamic in nature. I need to calculate the coordinates of the image and insert it at a particular cell (Example D5).

Can you explain me how ?
Rate this: bad
Please Sign up or sign in to vote.

Solution 2


For those who need this i am posting the solution also.
I posted the same question in MSDN Microsoft forums and got the solution.

I am posting the link below. Go through the entire post if needed.[^]

Thanks and Regards,
YKK Reddy

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 415
1 phil.o 170
2 Dave Kreskowiak 155
3 KrunalRohit 134
4 F-ES Sitecore 130
0 OriginalGriff 6,778
1 KrunalRohit 4,530
2 Sergey Alexandrovich Kryukov 3,203
3 George Jonsson 2,815
4 Suvendu Shekhar Giri 2,181

Advertise | Privacy | Mobile
Web04 | 2.8.151120.1 | Last Updated 13 Feb 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100