<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: How to insert an image in Excel Open XML</title>
	<atom:link href="http://polymathprogrammer.com/2009/11/30/how-to-insert-an-image-in-excel-open-xml/feed/" rel="self" type="application/rss+xml" />
	<link>http://polymathprogrammer.com/2009/11/30/how-to-insert-an-image-in-excel-open-xml/</link>
	<description>Mathematics. Programming. Entrepreneurship.</description>
	<lastBuildDate>Fri, 27 Jan 2012 12:15:54 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Vincent</title>
		<link>http://polymathprogrammer.com/2009/11/30/how-to-insert-an-image-in-excel-open-xml/comment-page-1/#comment-34335</link>
		<dc:creator>Vincent</dc:creator>
		<pubDate>Tue, 11 May 2010 13:17:58 +0000</pubDate>
		<guid isPermaLink="false">http://polymathprogrammer.com/?p=1668#comment-34335</guid>
		<description>Hey Dan, I&#039;m glad you found a way to use TwoCellAnchor. If I were in your situation, I&#039;d do the same thing too.

If I understand it correctly, by default, Excel use TwoCellAnchor instead of AbsoluteAnchor. I don&#039;t understand why the algorithm for it is made so complex.</description>
		<content:encoded><![CDATA[<p>Hey Dan, I&#8217;m glad you found a way to use TwoCellAnchor. If I were in your situation, I&#8217;d do the same thing too.</p>
<p>If I understand it correctly, by default, Excel use TwoCellAnchor instead of AbsoluteAnchor. I don&#8217;t understand why the algorithm for it is made so complex.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan</title>
		<link>http://polymathprogrammer.com/2009/11/30/how-to-insert-an-image-in-excel-open-xml/comment-page-1/#comment-34332</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Tue, 11 May 2010 09:27:31 +0000</pubDate>
		<guid isPermaLink="false">http://polymathprogrammer.com/?p=1668#comment-34332</guid>
		<description>I found a way to use the TwoCellAnchor class.

Resize the column and row so the image fit into one cell, in both widht and height. Insert the image and save the excel file.
Use OpenXML SDK Tool to open the file and get the FromMarker and ToMarker positions. Use our calculation of the Offset and Extents.

In this example I use column 2 and row 11 for the picture cell.

Xdr.TwoCellAnchor twoCellAnchor2 = new Xdr.TwoCellAnchor();

// Hard code the fromMarker pos:
fromMarker2.Append(new Xdr.ColumnId() { Text = &quot;2&quot; });
fromMarker2.Append(new Xdr.ColumnOffset() { Text = &quot;40821&quot; });
fromMarker2.Append(new Xdr.RowId() { Text = &quot;11&quot; });
fromMarker2.Append(new Xdr.RowOffset() { Text = &quot;32657&quot; });

// For the toMarker use the calulated values:
toMarker2.Append(new Xdr.ColumnId() { Text = &quot;2&quot; });
toMarker2.Append(new Xdr.ColumnOffset() { Text = ext.Cx.ToString() });
toMarker2.Append(new Xdr.RowId() { Text = &quot;11&quot; });
toMarker2.Append(new Xdr.RowOffset() { Text = ext.Cy.ToString() });

twoCellAnchor2.Append(fromMarker2);
twoCellAnchor2.Append(toMarker2);

twoCellAnchor2.Append(picture2);
twoCellAnchor2.Append(clientData2);</description>
		<content:encoded><![CDATA[<p>I found a way to use the TwoCellAnchor class.</p>
<p>Resize the column and row so the image fit into one cell, in both widht and height. Insert the image and save the excel file.<br />
Use OpenXML SDK Tool to open the file and get the FromMarker and ToMarker positions. Use our calculation of the Offset and Extents.</p>
<p>In this example I use column 2 and row 11 for the picture cell.</p>
<p>Xdr.TwoCellAnchor twoCellAnchor2 = new Xdr.TwoCellAnchor();</p>
<p>// Hard code the fromMarker pos:<br />
fromMarker2.Append(new Xdr.ColumnId() { Text = &#8220;2&#8243; });<br />
fromMarker2.Append(new Xdr.ColumnOffset() { Text = &#8220;40821&#8243; });<br />
fromMarker2.Append(new Xdr.RowId() { Text = &#8220;11&#8243; });<br />
fromMarker2.Append(new Xdr.RowOffset() { Text = &#8220;32657&#8243; });</p>
<p>// For the toMarker use the calulated values:<br />
toMarker2.Append(new Xdr.ColumnId() { Text = &#8220;2&#8243; });<br />
toMarker2.Append(new Xdr.ColumnOffset() { Text = ext.Cx.ToString() });<br />
toMarker2.Append(new Xdr.RowId() { Text = &#8220;11&#8243; });<br />
toMarker2.Append(new Xdr.RowOffset() { Text = ext.Cy.ToString() });</p>
<p>twoCellAnchor2.Append(fromMarker2);<br />
twoCellAnchor2.Append(toMarker2);</p>
<p>twoCellAnchor2.Append(picture2);<br />
twoCellAnchor2.Append(clientData2);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan</title>
		<link>http://polymathprogrammer.com/2009/11/30/how-to-insert-an-image-in-excel-open-xml/comment-page-1/#comment-34331</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Tue, 11 May 2010 08:21:46 +0000</pubDate>
		<guid isPermaLink="false">http://polymathprogrammer.com/?p=1668#comment-34331</guid>
		<description>The problem I have when use the AbsoluteAnchor class is that when printing the spreadsheet the picture position are not the same in the printable view as in the sheet in excel. I tried to use the TwoCellAnchor but are lost inte the calculation of the offset positions of the toMarker column and row.</description>
		<content:encoded><![CDATA[<p>The problem I have when use the AbsoluteAnchor class is that when printing the spreadsheet the picture position are not the same in the printable view as in the sheet in excel. I tried to use the TwoCellAnchor but are lost inte the calculation of the offset positions of the toMarker column and row.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: joe</title>
		<link>http://polymathprogrammer.com/2009/11/30/how-to-insert-an-image-in-excel-open-xml/comment-page-1/#comment-6181</link>
		<dc:creator>joe</dc:creator>
		<pubDate>Thu, 03 Dec 2009 19:59:52 +0000</pubDate>
		<guid isPermaLink="false">http://polymathprogrammer.com/?p=1668#comment-6181</guid>
		<description>thank you.  Exactly what i was looking for.</description>
		<content:encoded><![CDATA[<p>thank you.  Exactly what i was looking for.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

