Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# XML Excel .NET4 , +
Hi,
 
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.5K
Edited 30-Jan-12 2:42am
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

  Permalink  
Comments
YKK Reddy at 1-Feb-12 3:23am
   
Hi,
 
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
good
Please Sign up or sign in to vote.

Solution 2

Hi,

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.
http://social.msdn.microsoft.com/Forums/en/oxmlsdk/thread/5c6e7ebd-66e2-40fa-9194-aed5cdc3f0ae[^]

Thanks and Regards,
YKK Reddy
  Permalink  

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



Advertise | Privacy | Mobile
Web04 | 2.8.1411023.1 | Last Updated 13 Feb 2012
Copyright © CodeProject, 1999-2014
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