<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>How Can I Copy Data From One Spreadsheet to Another?</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2007/08/21/how-can-i-copy-data-from-one-spreadsheet-to-another.aspx</link><description>Hey, Scripting Guy! How can I copy data from one Excel spreadsheet to another Excel spreadsheet? -- AC 
 Hey, AC. You know, we’re going to let you in on a little secret here: the Scripting Guy who writes this column is a tad bit tired this morning. That</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: How Can I Copy Data From One Spreadsheet to Another?</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2007/08/21/how-can-i-copy-data-from-one-spreadsheet-to-another.aspx#3361211</link><pubDate>Mon, 11 Oct 2010 16:23:34 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3361211</guid><dc:creator>Matt</dc:creator><description>&lt;p&gt;ScriptingGuy,&lt;/p&gt;
&lt;p&gt;Your articles are very helpful... thanks for posting them. I am kind of stuck though and I am hoping that, even though it is several years down the road, you might be able to help.&lt;/p&gt;
&lt;p&gt;I am trying to do what you explained above (which sadly I hadn&amp;#39;t found this article when I started it) but it is acting strangely. The copy and paste works fine but the column widths are the defaults. If I try to change them it still doesn&amp;#39;t match to what my template is. The code I used for that is below.&lt;/p&gt;
&lt;p&gt;t_cols = db.Worksheets(ws).Range(db.Worksheets(ws).PageSetup.PrintArea).Columns;&lt;/p&gt;
&lt;p&gt;rng = s.Range(t_rng.Address).Columns;&lt;/p&gt;
&lt;p&gt;for(var n=1; n&amp;lt;=t_cols.count; n++)&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;	rng.item(n).EntireColumn.ColumnWidth = t_cols.item(n).ColumnWidth;&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;It is also doing the same thing with borders... Is there a way that I can fix this (preferably when copying)? The only thing I can think of that is different between your article and what I&amp;#39;ve done is that they are in the same Excel.Application. Would that matter?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;-Matt&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3361211" width="1" height="1"&gt;</description></item></channel></rss>