<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>A Developer&#039;s Blog &#187; Excel</title>
	<atom:link href="http://blog.hoegaerden.be/tag/excel/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.hoegaerden.be</link>
	<description>SQL Server, BI, .NET, IT and anything else I have been playing with.</description>
	<lastBuildDate>Wed, 01 Feb 2012 16:15:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>A Developer&#8217;s Excel: A Couple Of Tips</title>
		<link>http://blog.hoegaerden.be/2010/06/16/a-developers-excel-a-couple-of-tips/</link>
		<comments>http://blog.hoegaerden.be/2010/06/16/a-developers-excel-a-couple-of-tips/#comments</comments>
		<pubDate>Wed, 16 Jun 2010 15:27:44 +0000</pubDate>
		<dc:creator>Valentino Vranken</dc:creator>
				<category><![CDATA[Office]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Excel]]></category>

		<guid isPermaLink="false">http://blog.hoegaerden.be/2010/06/16/a-developers-excel-a-couple-of-tips/</guid>
		<description><![CDATA[As a BI developer I regularly use Excel to analyze my data on correctness.  In Excel it’s easy to filter out unrelated records, as you’ll probably already know. How do I get my data in Excel? With a simple copy/paste.  Since SQL Server 2008, you can just right-click on the results in the Management Studio [...]]]></description>
			<content:encoded><![CDATA[<p>As a BI developer I regularly use Excel to analyze my data on correctness.  In Excel it’s easy to filter out unrelated records, as you’ll probably already know.</p>
<h2>How do I get my data in Excel?</h2>
<p>With a simple copy/paste.  Since SQL Server 2008, you can just right-click on the results in the Management Studio and select <em>Copy with Headers</em>.  This will put the selected data into memory, including the column headers.</p>
<p><img style="display: inline; border-width: 0px;" title="SSMS 2008: right-click on results to Copy with Headers" src="http://blog.hoegaerden.be/wp-content/uploads/image293.png" border="0" alt="SSMS 2008: right-click on results to Copy with Headers" width="449" height="256" /></p>
<p>You can even make a selection in the Results pane and only copy that, as shown in the screenshot above.  Here’s what it looks like when pasted into Excel:</p>
<p><img style="display: inline; border-width: 0px;" title="Data with headers pasted into Excel" src="http://blog.hoegaerden.be/wp-content/uploads/image294.png" border="0" alt="Data with headers pasted into Excel" width="347" height="114" /></p>
<h3>How do I make the columns wider?</h3>
<p>Excel will not expand the column widths by default, shown in that last screenshot.  You could manually enlarge them one by one, but that’s not convenient when you last filled column is called “DI”.  Instead, I use the following trick.  First I select the whole sheet by clicking on the grey square in the top-left corner:</p>
<p><img style="display: inline; border-width: 0px;" title="Select the whole sheet using the grey square" src="http://blog.hoegaerden.be/wp-content/uploads/image295.png" border="0" alt="Select the whole sheet using the grey square" width="360" height="149" /></p>
<p>Then I double-click on the vertical divider in between columns A and B.  This will adjust all column widths so that the data fits nicely.</p>
<p><img style="display: inline; border-width: 0px;" title="Double-click the divider in between two columns to adjust width automatically" src="http://blog.hoegaerden.be/wp-content/uploads/image296.png" border="0" alt="Double-click the divider in between two columns to adjust width automatically" width="626" height="116" /></p>
<h2>Does Excel know SELECT DISTINCT?</h2>
<p>The other day I needed to filter out all duplicate records out of a really large dataset.  I first tried by activating the regular filter.  This is an Excel feature that I use a lot.  Just clicking the <strong>Filter</strong> button on the Data ribbon will add the small dropdowns next to each column’s header:</p>
<p><img style="display: inline; border: 0px;" title="Excel's Filter functionality" src="http://blog.hoegaerden.be/wp-content/uploads/image297.png" border="0" alt="Excel's Filter functionality" width="661" height="289" /></p>
<p>But in those dropdowns I couldn’t find an option which would get me to the required result.</p>
<p>(Note that I added a couple of duplicate records in my dataset.)</p>
<p>After a little search, I found the magic checkbox!  I didn’t know that it could be so easy.</p>
<p>To find it, click the <strong>Advanced</strong> button in the Data ribbon.</p>
<p><img style="display: inline; border-width: 0px;" title="The Advanced button on the Data ribbon" src="http://blog.hoegaerden.be/wp-content/uploads/image298.png" border="0" alt="The Advanced button on the Data ribbon" width="389" height="131" /></p>
<p>In the <strong>Advanced Filter</strong> window that appears you see a checkbox called <em>Unique records only</em>.</p>
<p><img style="display: inline; border: 0px;" title="Advanced Filter: Unique records only checkbox" src="http://blog.hoegaerden.be/wp-content/uploads/image299.png" border="0" alt="Advanced Filter: Unique records only checkbox" width="239" height="242" /></p>
<p>There’s your SELECT DISTINCT!</p>
<p>And here’s the sheet with the duplicates filtered out:</p>
<p><img style="display: inline; border: 0px;" title="Excel sheet after filtering out duplicate records with the &quot;Unique records only&quot; option" src="http://blog.hoegaerden.be/wp-content/uploads/image300.png" border="0" alt="Excel sheet after filtering out duplicate records with the &quot;Unique records only&quot; option" width="659" height="117" /></p>
<p>Do you also see that the filter dropdowns are gone, although I did not remove them?  The Advanced Filter cannot be used in combination with the regular filter.  Once you activate the regular filter by clicking the Filter button, your duplicates will re-appear.</p>
<p>If you want to further filter your data after filtering out all duplicate records, you should select the <em>Copy to another location </em>option in the Advanced Filter window.  Copy it below your data on the same sheet and apply the regular filter on that new set of data.</p>
<p><img style="display: inline; border: 0px;" title="Filtered set of data below full dataset on same sheet" src="http://blog.hoegaerden.be/wp-content/uploads/image301.png" border="0" alt="Filtered set of data below full dataset on same sheet" width="664" height="411" /></p>
<p>Copying to another sheet is not supported.  Apparently you can only copy to the active sheet.  Should you try it out anyway, you’ll get this message:</p>
<p><img style="display: inline; border: 0px;" title="Warning: You can only copy filtered data to the active sheet" src="http://blog.hoegaerden.be/wp-content/uploads/image302.png" border="0" alt="Warning: You can only copy filtered data to the active sheet" width="342" height="121" /></p>
<p>Happy filtering!</p>
<p>Valentino.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fblog.hoegaerden.be%2F2010%2F06%2F16%2Fa-developers-excel-a-couple-of-tips%2F&amp;title=A%20Developer%26rsquo%3Bs%20Excel%3A%20A%20Couple%20Of%20Tips" id="wpa2a_2"><img src="http://blog.hoegaerden.be/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.hoegaerden.be/2010/06/16/a-developers-excel-a-couple-of-tips/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Importing Data Using The Wizard: Mixing The Wrong Ingredients</title>
		<link>http://blog.hoegaerden.be/2010/05/03/importing-data-using-the-wizard-mixing-the-wrong-ingredients/</link>
		<comments>http://blog.hoegaerden.be/2010/05/03/importing-data-using-the-wizard-mixing-the-wrong-ingredients/#comments</comments>
		<pubDate>Mon, 03 May 2010 20:39:18 +0000</pubDate>
		<dc:creator>Valentino Vranken</dc:creator>
				<category><![CDATA[Integration Services]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[data]]></category>
		<category><![CDATA[Excel]]></category>
		<category><![CDATA[SSIS]]></category>

		<guid isPermaLink="false">http://blog.hoegaerden.be/2010/05/03/importing-data-using-the-wizard-mixing-the-wrong-ingredients/</guid>
		<description><![CDATA[A while ago I wrote an article about how you can use the SQL Server Import and Export wizard to import Excel data into a SQL Server database.  In this sequel I’m going to show you some problems which you may encounter when using that wizard.  Just like any good old wizard, he’s only as [...]]]></description>
			<content:encoded><![CDATA[<p>A while ago I wrote an <a title="Importing Excel Data Using Integration Services" href="http://blog.hoegaerden.be/2010/04/20/importing-excel-data-using-integration-services/">article about how you can use the SQL Server Import and Export wizard to import Excel data into a SQL Server database</a>.  In this sequel I’m going to show you some problems which you may encounter when using that wizard.  Just like any good old wizard, he’s only as good as his recipes.  If a recipe is missing an ingredient, the resulting potion will probably not behave as expected and before you know it it explodes in your face.</p>
<p>I’ll be using the same Excel file as in my previous article.  In case you’re having some problems understanding the data or locating certain screens mentioned in this article, I recommend you to first <a title="Importing Excel Data Using Integration Services" href="http://blog.hoegaerden.be/2010/04/20/importing-excel-data-using-integration-services/">read the prequel</a>.</p>
<h2>Some Common Wizard Pitfalls And Their Solution</h2>
<h3>Drop And Re-Create Destination Table</h3>
<p>Imagine that for your import process you’re planning to import that Excel data regularly.  So the logical step is to make sure that each time the process runs, it starts from scratch.  Following that, what seems to be an interesting checkbox is located on the <strong>Column Mappings</strong> screen.  This checkbox is called<em> Drop and re-create destination table</em>.</p>
<p><img style="display: inline; border: 0px;" title="Column Mappings: Drop and re-create destination table" src="http://blog.hoegaerden.be/wp-content/uploads/image234.png" border="0" alt="Column Mappings: Drop and re-create destination table" width="608" height="486" /></p>
<p>So you activate that checkbox and execute the package.  However, it ends with an error in the Executing phase:</p>
<p><img style="display: inline; border: 0px;" title="SQL Server Import and Export Wizard: error while Executing" src="http://blog.hoegaerden.be/wp-content/uploads/image235.png" border="0" alt="SQL Server Import and Export Wizard: error while Executing" width="566" height="579" /></p>
<p>Here’s what the error details say:</p>
<p><img style="display: inline; border: 0px;" title="image" src="http://blog.hoegaerden.be/wp-content/uploads/image236.png" border="0" alt="image" width="621" height="167" /></p>
<blockquote><p>Error 0xc002f210: Drop table failed… Cannot drop the table dbo.ProductList$ because it does not exist or you do not have permission.</p></blockquote>
<p>So why does this error occur?  Let’s examine the SSIS package that was generated.  This is what the Control Flow looks like:</p>
<p><img style="display: inline; border: 0px;" title="A Control Flow that doesn't take a non-existing table into account" src="http://blog.hoegaerden.be/wp-content/uploads/image237.png" border="0" alt="A Control Flow that doesn't take a non-existing table into account" width="161" height="232" /></p>
<p>New here is that Drop table SQL Task.  Taking a closer look at the task, here’s the query:</p>
<pre class="code"><span style="color: blue;">drop table </span>[dbo]<span style="color: gray;">.</span>[ProductList$]
<span style="color: blue;">GO</span></pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>So the first task is to drop the table.  This flow does not take into account that the table may not yet exist, as is the case here, causing the error.</p>
<p>However, do you notice the blue arrow connecting the Drop table task with the next SQL Task?  That means that it doesn’t require the execution of the task to end successfully, the flow will continue even when an error occurred (unlike when the green connector – meaning Success – is used).</p>
<p>Double-clicking the blue connector gives us the <strong>Precedence Constraint Editor</strong> window:</p>
<p><img style="display: inline; border: 0px;" title="Precedence Constraint Editor" src="http://blog.hoegaerden.be/wp-content/uploads/image238.png" border="0" alt="Precedence Constraint Editor" width="645" height="483" /></p>
<p>Indeed, the value for the constraint is set to <em>Completion</em>.</p>
<p>This also explains why the wizard continued executing all phases, even though an error occurred.  And the end result was that the table is really created, containing the data as expected.</p>
<p>If you’d like to avoid the error and handle the non-existing table, you could replace the query in the Drop table SQL Task with the following one:</p>
<pre class="code"><span style="color: blue;">if </span><span style="color: gray;">exists
(
    </span><span style="color: blue;">select </span><span style="color: gray;">* </span><span style="color: blue;">from </span><span style="color: green;">INFORMATION_SCHEMA</span><span style="color: gray;">.</span><span style="color: green;">TABLES </span>T
    <span style="color: blue;">where </span>T<span style="color: gray;">.</span>TABLE_NAME <span style="color: gray;">= </span><span style="color: red;">'ProductList$'
        </span><span style="color: gray;">and </span>T<span style="color: gray;">.</span>TABLE_SCHEMA <span style="color: gray;">= </span><span style="color: red;">'dbo'
</span><span style="color: gray;">)
    </span><span style="color: blue;">drop table </span>[dbo]<span style="color: gray;">.</span>[ProductList$]<span style="color: gray;">;</span></pre>
<p><a href="http://11011.net/software/vspaste"></a>It first checks if the table exists, taking schema into account, and will only perform the DROP TABLE statement if the table actually exists.</p>
<h3>Field Length Insufficient</h3>
<p>On to the next possible issue.  When examining our Excel sheet we find out that the content of the Class column is either blank or just one character:</p>
<p><img style="display: inline; border: 0px;" title="Possible values of the Class field" src="http://blog.hoegaerden.be/wp-content/uploads/image239.png" border="0" alt="Possible values of the Class field" width="287" height="308" /></p>
<p>So we decide to change its type to char(1), again using the <strong>Column Mappings</strong> screen.</p>
<p><img style="display: inline; border: 0px;" title="Column Mappings: change type to char(1)" src="http://blog.hoegaerden.be/wp-content/uploads/image240.png" border="0" alt="Column Mappings: change type to char(1)" width="584" height="653" /></p>
<p>However, clicking Finish at the end of the wizard gives us a fatal error:</p>
<p><img style="display: inline; border: 0px;" title="SQL Server Import and Export Wizard: Operatoin stopped in Error" src="http://blog.hoegaerden.be/wp-content/uploads/image241.png" border="0" alt="SQL Server Import and Export Wizard: Operatoin stopped in Error" width="566" height="579" /></p>
<p>And these are the details of the error:</p>
<ul>
<li>
<ul>
<li>Error 0xc02020c5: Data Flow Task 1: Data conversion failed while converting column &#8220;Class&#8221; (63) to column &#8220;Class&#8221; (139).  The conversion returned status value 4 and status text<strong> &#8220;Text was truncated or one or more characters had no match in the target code page.&#8221;</strong>.(SQL Server Import and Export Wizard)</li>
<li>Error 0xc020902a: Data Flow Task 1: The &#8220;output column &#8220;Class&#8221; (139)&#8221; failed because truncation occurred, and the truncation row disposition on &#8220;output column &#8220;Class&#8221; (139)&#8221; specifies failure on truncation. A truncation error occurred on the specified object of the specified component.
<p>(SQL Server Import and Export Wizard)</li>
<li>Error 0xc0047022: Data Flow Task 1: SSIS Error Code DTS_E_PROCESSINPUTFAILED.  The ProcessInput method on component &#8220;Data Conversion 0 &#8211; 0&#8243; (131) failed with error code 0xC020902A while processing input &#8220;Data Conversion Input&#8221; (132). The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running.  There may be error messages posted before this with more information about the failure.
<p>(SQL Server Import and Export Wizard)</li>
</ul>
</li>
</ul>
<p>Wow, that’s quite a long list for such a simple change!  Apparently it wasn’t such a good idea to limit the length of this field.  But why does this error occur?  After all, the values in this field are just one character long.  Except, after taking a closer look at the Excel sheet it turns out that these values contain a trailing space!</p>
<p>One way of avoiding this issue is by specifying a higher length for the field.  In this particular case however, you may decide to modify your <strong>Data Flow</strong> so that it removes the trailing space.  Here’s what the Data Flow currently looks like:</p>
<p><img style="display: inline; border: 0px;" title="Data Flow to import Excel data" src="http://blog.hoegaerden.be/wp-content/uploads/image242.png" border="0" alt="Data Flow to import Excel data" width="147" height="221" /></p>
<p>The <strong>Data Conversion transformation</strong> takes care of converting the Class column into a DT_STR of length 1.</p>
<p><a href="http://blog.hoegaerden.be/wp-content/uploads/image243.png"><img style="display: inline; border: 0px;" title="Data Conversion Transformation Editor" src="http://blog.hoegaerden.be/wp-content/uploads/image_thumb57.png" border="0" alt="Data Conversion Transformation Editor" width="684" height="593" /></a></p>
<p>We’re going to replace that <strong>Data Conversion Transformation</strong> with another one, a <strong>Derived Column transformation</strong>.  This is one of the transformations which I’m using all the time.</p>
<p><a href="http://blog.hoegaerden.be/wp-content/uploads/image244.png"><img style="display: inline; border: 0px;" title="Derived Column Transformation Editor" src="http://blog.hoegaerden.be/wp-content/uploads/image_thumb58.png" border="0" alt="Derived Column Transformation Editor" width="682" height="545" /></a></p>
<p>As you can see in the screenshot, I’ve set it up so that it uses <a title="BOL 2008: TRIM (SSIS Expressions)" href="http://msdn.microsoft.com/en-us/library/ms139947.aspx" target="_blank">the TRIM() function</a> on the Class input column to remove any leading or trailing spaces.  Furthermore I’m using a cast to DT_STR of length 1 to ensure the correct field type.  The resulting column is called Class_STR, to clearly indicate that it has been converted to DT_STR.</p>
<p>This is the resulting Data Flow:</p>
<p><img style="display: inline; border: 0px;" title="Data Flow: Destination component complains about lineage ID" src="http://blog.hoegaerden.be/wp-content/uploads/image245.png" border="0" alt="Data Flow: Destination component complains about lineage ID" width="178" height="234" /></p>
<p>Looks like we’ve got an issue with our Destination component now.  Which is quite logical: we still need to tell it that it should use the newly-created Class_STR column.  So double-click the component.</p>
<p><a href="http://blog.hoegaerden.be/wp-content/uploads/image246.png"><img style="display: inline; border: 0px;" title=" Restore Invalid Column References Editor" src="http://blog.hoegaerden.be/wp-content/uploads/image_thumb59.png" border="0" alt=" Restore Invalid Column References Editor" width="694" height="507" /></a></p>
<p>Double-clicking the Destination component will open up the<strong> Restore Invalid Column References Editor</strong>.  In Available Columns, select the new Class_STR column to replace the Class column which was used previously.</p>
<p>That’s it, your SSIS package will now remove the trailing spaces from the Class column and store it in a column of char(1).</p>
<h3>Excel Layout Change</h3>
<p>Here’s another common issue when dealing with Excel SSIS imports.  If you’re not 100% in control of that Excel sheet, someone will someday make a structural change to it and it will cause your import process to fail.</p>
<p>In this really simple example I’ve opened up the Excel sheet and renamed the Color column to Colour.  Which is something that may happen in real life: a British person takes over the maintenance of that product list and sees that the Color column is spelled the wrong way, and corrects it without informing anyone.</p>
<p>What does that mean for our import?  Here’s the result when manually executing the package using <a title="BOL 2008: How to: Run a Package Using the DTExecUI Utility" href="http://msdn.microsoft.com/en-us/library/ms141707.aspx" target="_blank">DTExecUI.exe</a>:</p>
<p><a href="http://blog.hoegaerden.be/wp-content/uploads/image247.png"><img style="display: inline; border: 0px;" title="DTExecUI: Package Execution Progress" src="http://blog.hoegaerden.be/wp-content/uploads/image_thumb60.png" border="0" alt="DTExecUI: Package Execution Progress" width="688" height="313" /></a></p>
<p>In this case execution will fail because the package cannot find the Color column in the Excel sheet.  More precisely it says VS_NEEDSNEWMETADATA.  This is a really common error when using Integration Services, but you need to manually update the package to handle such changes.</p>
<p>In other words: try to be in control of that sheet as much as you can, and if possible: set up another way to maintain such data.  For instance by using a <a title="SQL Server 2008 R2 Master Data Services" href="http://www.microsoft.com/sqlserver/2008/en/us/mds.aspx" target="_blank">Master Data Management system</a>.  But that’s stuff for later on, in future articles.</p>
<h2>Conclusion</h2>
<p>As long as you’re aware of some of the common issues into which you may run, I still think the Import and Export Wizard is an interesting option to start your first SSIS package.  When running into an issue, I recommend to open up the SSIS package and have a closer look through the Business Intelligence Development Studio.  Then make any changes there so you can handle the errors.</p>
<p>Happy importing!</p>
<p>Valentino.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fblog.hoegaerden.be%2F2010%2F05%2F03%2Fimporting-data-using-the-wizard-mixing-the-wrong-ingredients%2F&amp;title=Importing%20Data%20Using%20The%20Wizard%3A%20Mixing%20The%20Wrong%20Ingredients" id="wpa2a_4"><img src="http://blog.hoegaerden.be/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.hoegaerden.be/2010/05/03/importing-data-using-the-wizard-mixing-the-wrong-ingredients/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Importing Excel Data Using Integration Services</title>
		<link>http://blog.hoegaerden.be/2010/04/20/importing-excel-data-using-integration-services/</link>
		<comments>http://blog.hoegaerden.be/2010/04/20/importing-excel-data-using-integration-services/#comments</comments>
		<pubDate>Tue, 20 Apr 2010 21:21:02 +0000</pubDate>
		<dc:creator>Valentino Vranken</dc:creator>
				<category><![CDATA[Integration Services]]></category>
		<category><![CDATA[SQLServerPedia Syndication]]></category>
		<category><![CDATA[data]]></category>
		<category><![CDATA[Excel]]></category>
		<category><![CDATA[SSIS]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://blog.hoegaerden.be/2010/04/20/importing-excel-data-using-integration-services/</guid>
		<description><![CDATA[In a previous article I’ve shown you how to import data from an Excel sheet using the OPENROWSET() function.&#160; And I concluded by stating that it’s not the best option when automating your data import. Today I’ll repeat the Excel data import process by using SQL Server Integration Services, also known as SSIS. I’ll be [...]]]></description>
			<content:encoded><![CDATA[<p>In a previous article I’ve shown you <a title="Retrieving Data From Excel" href="http://blog.hoegaerden.be/2010/03/29/retrieving-data-from-excel/" target="_blank">how to import data from an Excel sheet using the OPENROWSET() function</a>.&#160; And I concluded by stating that it’s not the best option when automating your data import.</p>
<p>Today I’ll repeat the Excel data import process by using SQL Server Integration Services, also known as SSIS.</p>
<p>I’ll be using SQL Server 2008 R2, but I’m quite sure that the process is very similar to the first release of 2008, and even to 2005.&#160; The Excel file that I will be importing is the one used in my previous article, and I’ll also refer to some parts of that article, so you may want to have a read over that one when something here isn’t clear.</p>
<p>Furthermore I’m using a Windows 7 64-bit machine, with <a title="2010 Office System Driver Beta: Data Connectivity Components" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=C06B8369-60DD-4B64-A44B-84B371EDE16D&amp;amp;displaylang=ja&amp;displaylang=en" target="_blank">the ACE 14 driver</a> (beta) installed.&#160; To avoid any discussion about versions and for my own (future) reference, here’s the result of a SELECT @@VERSION:</p>
<blockquote><p>Microsoft SQL Server 2008 R2 (CTP) &#8211; 10.50.1352.12 (X64)&#160;&#160; Oct 30 2009 18:06:48&#160;&#160; Copyright (c) Microsoft Corporation&#160; Enterprise Evaluation Edition (64-bit) on Windows NT 6.1 &lt;X64&gt; (Build 7600: ) </p>
</blockquote>
<h2>Create SSIS Package To Import Excel Data</h2>
<p>Usually you will start by creating a new package in an Integration Services project, add an Excel source to a new Data Flow, throw in some Data Flow Transformations and end your flow with an OLE DB Destination connecting to your SQL Server.</p>
<p>But that’s not the approach that I’ll take in this article.&#160; I’ll make use of a shortcut (and meanwhile I’m showing you how well integrated some components really are).</p>
<p>First, I’m creating a new database called <em>ExcelImport</em>, using the Management Studio (aka SSMS).&#160; Once the database is created, right-click on it and choose Tasks &gt; Import Data.</p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Start the Import Data Wizard through Management Studio" border="0" alt="Start the Import Data Wizard through Management Studio" src="http://blog.hoegaerden.be/wp-content/uploads/image213.png" width="586" height="652" /> </p>
<p>This will open up the <a title="BOL 2008: Importing and Exporting Data by Using the SQL Server Import and Export Wizard" href="http://msdn.microsoft.com/en-us/library/ms141209.aspx" target="_blank">SQL Server Import And Export Data Wizard</a>.&#160; Like all good wizards, it starts with a <strong>Welcome</strong> screen containing an introductory text about its purpose – something about “create simple packages that import and export data between many popular data formats including databases, spreadsheets” – and so on.&#160; It also includes a checkbox that says “Do not show this starting page again”.&#160; That’s my favorite object on the page <img src='http://blog.hoegaerden.be/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> &#160; Okay, I agree, the page is useful for people who have never seen the wizard before and who may have opened it up by accident, but that’s about as far as its use goes methinks.</p>
<p>So, do whatever you like with the checkbox and click Next.&#160; That opens up the <strong>Choose a Data Source</strong> screen.</p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="SQL Server Import and Export Wizard - Choose a Data Source" border="0" alt="SQL Server Import and Export Wizard - Choose a Data Source" src="http://blog.hoegaerden.be/wp-content/uploads/image214.png" width="566" height="579" /> </p>
<p>In that screen you have several options in the Data Source dropdown.&#160; The one we’re interested in is called <em>Microsoft Excel</em>.&#160; Once that option is selected, the controls further down the screen change into what is shown in the screenshot.&#160; Select your file and the right version, in my case I’ve got an Excel 2007 file.&#160; If your sheet contains a header row, activate the <em>First row has column names</em> checkbox.</p>
<p>Clicking Next will open up the <strong>Choose a Destination</strong> screen.</p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="SQL Server Import and Export Wizard - Choose a Destination" border="0" alt="SQL Server Import and Export Wizard - Choose a Destination" src="http://blog.hoegaerden.be/wp-content/uploads/image215.png" width="566" height="579" /> </p>
<p>In that screen, select <em>Microsoft OLE DB Provider for SQL Server</em> as Destination.&#160; Ensure that your SQL Server instance is the right one in the <em>Server Name</em> dropdown and the <em>Authentication</em> is filled out as expected.&#160; The correct database should be selected by default because we did a right-click on it to start the wizard.</p>
<p>Another Next click opens up the <strong>Specify Table Copy or Query</strong> window.</p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="SQL Server Import and Export Wizard - Specify Table Copy or Query" border="0" alt="SQL Server Import and Export Wizard - Specify Table Copy or Query" src="http://blog.hoegaerden.be/wp-content/uploads/image216.png" width="566" height="579" /> </p>
<p>Here we can choose between either retrieving the full table – all rows, all columns – or writing a query ourselves.&#160; I’ll go for the first option.</p>
<p>Click Next once more to open the <strong>Select</strong> <strong>Source Tables and Views</strong> screen.&#160; That name seems a bit weird in the context of an Excel import but I guess that’s not really important here.&#160; Just read it as “Select the sheet that you’d like to import”.</p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="SQL Server Import and Export Wizard - Select Source Table and Views" border="0" alt="SQL Server Import and Export Wizard - Select Source Table and Views" src="http://blog.hoegaerden.be/wp-content/uploads/image217.png" width="567" height="579" />&#160;</p>
<p>I’ll go for the ProductList$ Source.&#160; The sheet in my Excel file is called ProductList.&#160; Note that the Destination is editable – I’m changing the destination table to dbo.ProductList (with the dollar sign removed).</p>
<p>If you’d like to view your data right now you can hit the Preview button.&#160; It opens up a window such as this one:</p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="SQL Server Import and Export Wizard - Select Source Table and Views - Preview Data" border="0" alt="SQL Server Import and Export Wizard - Select Source Table and Views - Preview Data" src="http://blog.hoegaerden.be/wp-content/uploads/image218.png" width="528" height="338" />&#160; </p>
<p>That should look familiar.</p>
<p>A more interesting button is the one called <em>Edit Mappings</em>.&#160; Clicking that button opens a screen that lets you change the destination table’s schema.&#160; By default, all columns that seem to be numeric are mapped to a type of float and all the others are mapped to nvarchar with a length of 255.&#160; Depending on your situation you can either leave it as it is (in case you’re just loading a staging table and want to handle data conversions later on) or you should review each column (for instance when you’re erasing and loading the full table every night and this is the actual table being used by other processes).</p>
<p><strong>Note:</strong> whenever a column contains a blank cell, its type will be nvarchar(255), even when all other values are numeric.&#160; Also, if you don’t need Unicode support, don’t use nvarchar but change it to varchar instead.</p>
<p>Here’s the <strong>Column Mappings </strong>screen with some of the defaults changed:</p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="The Column Mappings window" border="0" alt="The Column Mappings window" src="http://blog.hoegaerden.be/wp-content/uploads/image219.png" width="636" height="794" /> </p>
<p>Everything that I changed has been indicated using the yellow marker.&#160; I’ve changed some field types and lenghts, made one field non-nullable and adapted the destination name.</p>
<p>Clicking OK followed by Next brings us to the following screen, <strong>Review Data Type Mapping</strong>.</p>
<p><a href="http://blog.hoegaerden.be/wp-content/uploads/image220.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="SQL Server Import and Export Wizard - Review Data Type Mapping" border="0" alt="SQL Server Import and Export Wizard - Review Data Type Mapping" src="http://blog.hoegaerden.be/wp-content/uploads/image_thumb56.png" width="678" height="834" /></a> </p>
<p>This screen gives another overview of all the columns that we’re planning to import.&#160; Note that each column of which we’ve changed the type has gotten a nice yellow warning sign.&#160; This happens because a data conversion needs to occur, and there’s always something that can go wrong when converting data.&#160; The<em> On Error</em> and <em>On Truncation</em> columns show the action that should happen when such an event occurs.&#160; We’ll leave them all at <em>Use Global</em>.&#160; The Global settings are located at the bottom of the screen and are both set to <em>Fail</em>.&#160; That’s the best option at the moment (the only other one is <em>Ignore</em> but that means you won’t get any notification in case of an error or truncation problem).</p>
<p>After clicking Next we end up at the <strong>Save and Run Package</strong> window.</p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="SQL Server Import and Export Wizard - Save and Run Package" border="0" alt="SQL Server Import and Export Wizard - Save and Run Package" src="http://blog.hoegaerden.be/wp-content/uploads/image221.png" width="644" height="579" /> </p>
<p>I have activated the <em>Save SSIS Package</em> checkbox and chose the <em>Do not save sensitive data</em> option.&#160; By default it is saved in SQL Server, which is actually the MSDB.&#160; That’s good because we’re going to examine the contents of the package later on so we want to keep it.</p>
<p>The <em>Run immediately </em>checkbox was activated by default.&#160; This will execute the package in the last step of the wizard.</p>
<p>Another Next click and we’re on the <strong>Save SSIS Package </strong>screen.</p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="SQL Server Import and Export Wizard - Save SSIS Package" border="0" alt="SQL Server Import and Export Wizard - Save SSIS Package" src="http://blog.hoegaerden.be/wp-content/uploads/image222.png" width="566" height="579" /> </p>
<p>Here we can give our package a decent name, such as ExcelImport.&#160; You can also see the server on which I’m saving the package.</p>
<p>The final Next click brings us to the <strong>Complete the Wizard</strong> screen, woohoo!</p>
<p>&#160;<img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="SQL Server Import and Export Wizard - Complete the Wizard" border="0" alt="SQL Server Import and Export Wizard - Complete the Wizard" src="http://blog.hoegaerden.be/wp-content/uploads/image223.png" width="566" height="579" /> </p>
<p>We can see a short overview of what we’ve configured in the previous steps.&#160; Click Finish to execute and save the package!</p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="SQL Server Import and Export Wizard - The execution was successful" border="0" alt="SQL Server Import and Export Wizard - The execution was successful" src="http://blog.hoegaerden.be/wp-content/uploads/image224.png" width="566" height="579" /> </p>
<p>And we’ve successfully executed the package!</p>
<h2>Taking A Closer Look At The SSIS Package</h2>
<p>When connecting to the Integration Services server (through SSMS for instance), I now have a new package in the root of the MSDB folder.</p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="The ExcelImport SSIS package, stored in MSDB" border="0" alt="The ExcelImport SSIS package, stored in MSDB" src="http://blog.hoegaerden.be/wp-content/uploads/image225.png" width="269" height="171" /> </p>
<p>It’s located there because I chose to save the package to SQL Server.</p>
<h3>Adding An Existing Package To An SSIS Project</h3>
<p>We’re now going to open it in the Business Intelligence Development Studio (aka BIDS).&#160; So, open the BIDS and create a new SSIS Project (or use an existing one, doesn’t really matter).</p>
<p>Once the project is open, right-click the SSIS Packages folder in the Solution Explorer and select <em>Add Existing Package</em>.</p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Right-click SSIS Packages folder in Solution Explorer to Add Existing Package" border="0" alt="Right-click SSIS Packages folder in Solution Explorer to Add Existing Package" src="http://blog.hoegaerden.be/wp-content/uploads/image226.png" width="357" height="316" /> </p>
<p>That opens up the <em>Add Copy of Existing Package</em> window.</p>
<p><strong>Sidenote</strong>: do you see that <em>SSIS Import and Export Wizard</em> option in the previous screenshot?&#160; That’s right, the wizard that we’ve used extensively in the earlier part of this article can be launched from here as well.</p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Add Copy of Existing Package" border="0" alt="Add Copy of Existing Package" src="http://blog.hoegaerden.be/wp-content/uploads/image227.png" width="600" height="438" /> </p>
<p>Select <em>SSIS Package Store</em> as location of the package and enter the name of your server in the second dropdown.&#160; Once that is done you can click the button with the ellipsis and select your package under the MSDB node.</p>
<p>Clicking OK will add the package to your project in the Solution Explorer.&#160; Double-click it to open it up.</p>
<h3>The Control Flow</h3>
<p>In the Control Flow you can see two components: a SQL Task that contains a CREATE TABLE statement and a Data Flow.</p>
<p>Here’s what the CREATE TABLE statement looks like:</p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="CREATE TABLE statement in the Execute SQL Task" border="0" alt="CREATE TABLE statement in the Execute SQL Task" src="http://blog.hoegaerden.be/wp-content/uploads/image228.png" width="336" height="479" /> </p>
<p>As you can see, the table is created using the column names and types just like we configured them through the wizard.</p>
<p>Important to note here is that the Control Flow does not take anything else into account.&#160; For instance, what happens if we execute the package twice?&#160; It will fail because the table already exists!</p>
<p>In case you don’t believe me, just try it out!</p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Execute SQL Statement failed" border="0" alt="Execute SQL Statement failed" src="http://blog.hoegaerden.be/wp-content/uploads/image229.png" width="167" height="149" />&#160;<img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="There is already an object named &#39;ProductList&#39; in the database." border="0" alt="There is already an object named &#39;ProductList&#39; in the database." src="http://blog.hoegaerden.be/wp-content/uploads/image230.png" width="861" height="144" />&#160;</p>
<h3>The Data Flow</h3>
<p>Opening up the Data Flow we see that it contains three components: an Excel source component that uses an Excel Connection Manager to connect to our now well-known Excel sheet, a Data Conversion Transformation to take care of the conversions that we requested and an OLE DB Destination that uses an OLE DB Connection Manager to connect to our SQL Server.</p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="The Data Flow to transfer Excel data into SQL Server" border="0" alt="The Data Flow to transfer Excel data into SQL Server" src="http://blog.hoegaerden.be/wp-content/uploads/image232.png" width="165" height="227" /> </p>
<p>Important to note here is that whenever an issue occurs, such as a conversion problem, the flow will fail.</p>
<p>In production environments, certain events need to be taken into account.&#160; The purpose of this article was just to show you how you can use a wizard to generate an SSIS package for you.&#160; You can now use this package as the basis for a well-developed Excel Import template.</p>
<h2>Conclusion</h2>
<p>With this article I hope to have shown you how to use Integration Services to import Excel data, and also that the Management Studio knows how to use other SQL Server components, such as SSIS, quite well.</p>
<p>If you’re running into some issues while using the wizard, or you just like reading what I write, <a title="Importing Data Using The Wizard: Mixing The Wrong Ingredients" href="http://blog.hoegaerden.be/2010/05/03/importing-data-using-the-wizard-mixing-the-wrong-ingredients/">check out my follow-up article covering some common pitfalls</a>.</p>
<p>Need to go to sleep now, long drive tomorrow, PASS European Conference in Germany!&#160; I do hope that Adam Saxton will be there because I was planning to see his presentations all day long.&#160; I already read that one of the speakers – Brent Ozar – won’t be able to make it.&#160; Darned ash cloud…&#160; Next time someone starts talking to me about Azure I’ll run away screaming.</p>
<p>Just kidding <img src='http://blog.hoegaerden.be/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Have fun!</p>
<p>Valentino.</p>
<p><strong>References</strong></p>
<p><a title="Microsoft Support: How to import data from Excel to SQL Server" href="http://support.microsoft.com/kb/321686" target="_blank">Microsoft Support: How to import data from Excel to SQL Server</a></p>
</p>
<p><a title="BOL 2008 - How to: Run the SQL Server Import and Export Wizard" href="http://msdn.microsoft.com/en-us/library/ms140052.aspx" target="_blank">How to: Run the SQL Server Import and Export Wizard</a></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fblog.hoegaerden.be%2F2010%2F04%2F20%2Fimporting-excel-data-using-integration-services%2F&amp;title=Importing%20Excel%20Data%20Using%20Integration%20Services" id="wpa2a_6"><img src="http://blog.hoegaerden.be/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.hoegaerden.be/2010/04/20/importing-excel-data-using-integration-services/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Retrieving Data From Excel</title>
		<link>http://blog.hoegaerden.be/2010/03/29/retrieving-data-from-excel/</link>
		<comments>http://blog.hoegaerden.be/2010/03/29/retrieving-data-from-excel/#comments</comments>
		<pubDate>Mon, 29 Mar 2010 20:16:53 +0000</pubDate>
		<dc:creator>Valentino Vranken</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQLServerPedia Syndication]]></category>
		<category><![CDATA[data]]></category>
		<category><![CDATA[Excel]]></category>
		<category><![CDATA[T-SQL]]></category>

		<guid isPermaLink="false">http://blog.hoegaerden.be/2010/03/29/retrieving-data-from-excel/</guid>
		<description><![CDATA[The purpose of this article is to demonstrate how to retrieve data from an Excel sheet and put it in a table in a SQL Server database. Introduction Anyone who&#8217;s ever used a computer for a significant amount of time has probably come into contact with Excel, the spreadsheet application part of the Microsoft Office [...]]]></description>
			<content:encoded><![CDATA[<p>The purpose of this article is to demonstrate how to retrieve data from an Excel sheet and put it in a table in a SQL Server database.</p>
<h2>Introduction</h2>
<p>Anyone who&#8217;s ever used a computer for a significant amount of time has probably come into contact with <a title="Excel 2007" href="http://office.microsoft.com/en-us/excel/default.aspx" target="_blank">Excel</a>, the spreadsheet application part of the Microsoft Office suite. Its main purposes are to perform calculations and create charts and pivot tables for analysis.</p>
<p>But people have great imagination and invent new uses for it every day.  I&#8217;ve even seen it used as a picture album.  (Sorry dad, but I know you won’t be reading this anyway. <img src='http://blog.hoegaerden.be/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> )  Ever since he had this specific YACI, or “Yet Another Computer Issue”, because his PC wasn’t powerful enough to open his 45 MB Excel file, uh, “picture collection”, he took some evening classes.  He’s now putting his Photoshopped pictures in PowerPoint…  Anyway, let’s get back on track now.</p>
<p>Another use, and the one that&#8217;s the subject of this article, is when Excel has been used as a database.  Come on, you know what I&#8217;m talking about, with the first row containing the column headers followed by possibly thousands of data rows.  The following screenshot contains an example, and is also the file that I will be using in this article.  I took all records from the <strong>Production.Product</strong> table in the <a title="AdventureWorks 2008R2 November CTP" href="http://msftdbprodsamples.codeplex.com/releases/view/24854" target="_blank">AdventureWorks 2008R2</a> database and dumped them in Excel.</p>
<p><a href="http://blog.hoegaerden.be/wp-content/uploads/image206.png"><img style="display: inline; border-width: 0px;" title="An Excel sheet used as a data store" src="http://blog.hoegaerden.be/wp-content/uploads/image_thumb54.png" border="0" alt="An Excel sheet used as a data store" width="681" height="224" /></a></p>
<p>At some point people will realize, either because someone told them or because they lost some data due to inattentiveness, that it wasn&#8217;t a really good idea to keep all that data in an Excel sheet.  And they&#8217;ll ask you to put it in a real database such as SQL Server.</p>
<p>That&#8217;s what I&#8217;m going to show you in the next paragraphs: how to import data from Excel into SQL Server.</p>
<h2>Using OPENROWSET() To Query Excel Files</h2>
<p>There are actually several different ways to achieve this.  In this article I will use the <a title="BOL2008: OPENROWSET (Transact-SQL)" href="http://msdn.microsoft.com/en-us/library/ms190312.aspx" target="_blank">OPENROWSET()</a> function.  This is a T-SQL function that can be used to access any OLE DB data source.  All you need is the right OLE DB driver.  The oldest version which I could confirm that contains this function is SQL Server 7.0, good enough to say that any version supports it.</p>
<p>My sample Excel files are located in <em>C:\temp\</em>.  This folder contains two files:<em> Products.xls</em> and <em>Products.xlsx</em>.  The first file is saved in the old format, Excel 97-2003, while the second file was saved from Excel 2010.  Both files contain the same data.  The sheet containing the list of products is called <em>ProductList</em>.</p>
<p>And here are the queries:</p>
<p><a href="http://11011.net/software/vspaste"></a><a href="http://11011.net/software/vspaste"></a></p>
<pre class="code"><span style="color: green;">--Excel 2007-2010
</span><span style="color: blue;">SELECT </span><span style="color: gray;">* </span><span style="color: green;">--INTO #productlist
</span><span style="color: blue;">FROM OPENROWSET</span><span style="color: gray;">(</span><span style="color: red;">'Microsoft.ACE.OLEDB.12.0'</span><span style="color: gray;">,
    </span><span style="color: red;">'Excel 12.0 Xml;HDR=YES;Database=C:\temp\Products.xlsx'</span><span style="color: gray;">,
    </span><span style="color: red;">'SELECT * FROM [ProductList$]'</span><span style="color: gray;">);

</span><span style="color: green;">--Excel 97-2003
</span><span style="color: blue;">SELECT </span><span style="color: gray;">* </span><span style="color: green;">--INTO #productlist
</span><span style="color: blue;">FROM OPENROWSET</span><span style="color: gray;">(</span><span style="color: red;">'Microsoft.Jet.OLEDB.4.0'</span><span style="color: gray;">,
    </span><span style="color: red;">'Excel 8.0;HDR=YES;Database=C:\temp\Products.xls'</span><span style="color: gray;">,
    </span><span style="color: red;">'select * from [ProductList$]'</span><span style="color: gray;">);</span></pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>These queries are just returning the data from the Excel file into the Results window, when executed using the Management Studio.  To insert the data into a table, uncomment the <a title="BOL2008: INTO Clause (Transact-SQL)" href="http://msdn.microsoft.com/en-us/library/ms188029.aspx" target="_blank">INTO</a> clause.  When uncommented, the statement retrieves the data from the Excel sheet and puts it into a newly-created <a title="BOL2008: Special Table Types" href="http://msdn.microsoft.com/en-us/library/ms186986.aspx" target="_blank">local temporary table</a> called <em>#productlist</em>.</p>
<p>Furthermore, the query assumes that the first row contains the header.  If that’s not the case, replace HDR=YES with HDR=NO.</p>
<p><strong>Note:</strong> if you get an error message when running the query, look further down in this article.  I’ve covered a couple of them.</p>
<p>With the INTO clause uncommented and the query executed, the temporary table can now be queried just like any other table:</p>
<pre class="code"><span style="color: blue;">SELECT </span><span style="color: gray;">* </span><span style="color: blue;">FROM </span>#productlist</pre>
<h3>What Type Is Your Data?</h3>
<p>Let’s have a look if this method of using a SELECT INTO in combination with OPENROWSET and a temporary table is smart enough to interpret the correct data types of the data coming in.  Use the following command to describe the metadata of the temporary table:</p>
<pre class="code"><span style="color: blue;">USE </span>tempdb<span style="color: gray;">;
</span><span style="color: blue;">GO
</span><span style="color: maroon;">sp_help </span><span style="color: red;">'#productlist'</span><span style="color: gray;">;</span></pre>
<p><a href="http://11011.net/software/vspaste"></a>Because a temporary table is stored in the <em>tempdb</em>, the <a title="BOL2008: sp_helptext (Transact-SQL)" href="http://msdn.microsoft.com/en-us/library/ms176112.aspx" target="_blank">sp_help</a> command should be issued against that database.</p>
<p>Here’s the part of the output in which we’re interested:</p>
<p><img style="display: inline; border-width: 0px;" title="The data types used when combining OPENROWSET with SELECT INTO" src="http://blog.hoegaerden.be/wp-content/uploads/image207.png" border="0" alt="The data types used when combining OPENROWSET with SELECT INTO" width="377" height="442" /></p>
<p>As you can see, anything that looks like text will be put in a field of type<em> nvarchar(510)</em> and anything that looks like a number (integers, floating-point numbers, datetime values, …) is put into a <em>float(53)</em>.  Not a lot of intelligence there.  This is the result when no formatting was put on the cells in Excel.</p>
<p>As an experiment I’ve changed the format of some fields in the Excel file and then retried the SELECT INTO statement.  What did I change?  I identified <em>ProductID</em> as being a number without any decimals, changed <em>StandardCost</em> and <em>ListPrice</em> to a currency with four decimal digits and I changed <em>SellStartDate</em> and <em>SellEndDate</em> to a custom date/time format showing both date and time.</p>
<p>The effect on the table creation was not completely as I would have expected:</p>
<p><img style="display: inline; border-width: 0px;" title="SELECT INTO with some field types changed" src="http://blog.hoegaerden.be/wp-content/uploads/image208.png" border="0" alt="SELECT INTO with some field types changed" width="382" height="446" /></p>
<p><em>ProductID</em> is still being stored into a float field, even though in Excel it’s defined as having no decimals.  And the datetime values are not recognized either.  Okay, I used a custom format there, so maybe it’s due to that.</p>
<p>It’s up to you of course how you use this method of importing the data.  You can put your records into a temporary table to process further, or you can create a table with the expected data types upfront and import the data directly into that one.</p>
<h2>Some Possible Issues</h2>
<p>Let’s cover some issues related to this method.</p>
<h3>Enable ‘AD Hoc Distributed Queries’</h3>
<p>The OPENROWSET() function expects that the <a title="BOL2008: ad hoc distributed queries Option" href="http://msdn.microsoft.com/en-us/library/ms187569.aspx" target="_blank">‘Ad Hoc Distributed Queries’ option</a> is enabled on the server.  When that’s not the case you’ll see the following message:</p>
<blockquote><p><span style="color: #ff0000;">Msg 15281, Level 16, State 1, Line 1</span></p>
<p><span style="color: #ff0000;">SQL Server blocked access to STATEMENT &#8216;OpenRowset/OpenDatasource&#8217; of component &#8216;Ad Hoc Distributed Queries&#8217; because this component is turned off as part of the security configuration for this server. A system administrator can enable the use of &#8216;Ad Hoc Distributed Queries&#8217; by using sp_configure. For more information about enabling &#8216;Ad Hoc Distributed Queries&#8217;, see &#8220;Surface Area Configuration&#8221; in SQL Server Books Online.</span></p></blockquote>
<p>This is one of the advanced options.  To enable it you can use the following command:</p>
<pre class="code"><span style="color: maroon;">sp_configure </span><span style="color: red;">'show advanced options'</span><span style="color: gray;">, </span>1<span style="color: gray;">;
</span><span style="color: blue;">GO
RECONFIGURE</span><span style="color: gray;">;
</span><span style="color: blue;">GO

</span><span style="color: maroon;">sp_configure </span><span style="color: red;">'Ad Hoc Distributed Queries'</span><span style="color: gray;">, </span>1<span style="color: gray;">;
</span><span style="color: blue;">GO
RECONFIGURE</span><span style="color: gray;">;
</span><span style="color: blue;">GO</span></pre>
<p>To get a good look at all the different settings, just run the <a title="BOL2008: sp_configure (Transact-SQL)" href="http://msdn.microsoft.com/en-us/library/ms188787.aspx" target="_blank">sp_configure</a> procedure without any parameters.</p>
<p><strong>Note:</strong> if you’re not the administrator of the server, you should talk to the DBA who’s responsible before attempting this.</p>
<h3>The File Needs To Be Closed</h3>
<p>When the Excel file is not closed, you’ll end up with the following error:</p>
<blockquote><p><span style="color: #ff0000;">Msg 7399, Level 16, State 1, Line 1</span></p>
<p><span style="color: #ff0000;">The OLE DB provider &#8220;Microsoft.Jet.OLEDB.4.0&#8243; for linked server &#8220;(null)&#8221; reported an error. The provider did not give any information about the error.</span></p>
<p><span style="color: #ff0000;">Msg 7303, Level 16, State 1, Line 1 </span></p>
<p><span style="color: #ff0000;">Cannot initialize the data source object of OLE DB provider &#8220;Microsoft.Jet.OLEDB.4.0&#8243; for linked server &#8220;(null)&#8221;.</span></p></blockquote>
<p>So close the file and try the query again.</p>
<h3>OLE DB Driver Not Installed</h3>
<p>The OPENROWSET() function uses OLE DB, so it needs a driver for your data source, in this case for Excel.  If the right driver is not installed, you’ll see the following error (or similar, depends on the version used).</p>
<blockquote><p><span style="color: #ff0000;">Msg 7302, Level 16, State 1, Line 1</span></p>
<p><span style="color: #ff0000;">Cannot create an instance of OLE DB provider &#8220;Microsoft.ACE.OLEDB.12.0&#8243; for linked server &#8220;(null)&#8221;.</span></p></blockquote>
<p>To solve the issue, install the right driver and try again.</p>
<p>How can you tell what drivers are installed?  Open up the <strong>ODBC Data Source Administrator</strong> window (Start &gt; Run &gt; type ODBCAD32.EXE and enter) and have a look in the <em>Drivers</em> tab.  The following screenshot (taken on a Dutch Windows XP) shows both the JET 4.0 driver for Excel 97-2003 and the fairly-new ACE driver for Excel 2007.</p>
<p><img style="display: inline; border-width: 0px;" title="odbcad32.exe - ODBC Data Source Administrator" src="http://blog.hoegaerden.be/wp-content/uploads/image209.png" border="0" alt="odbcad32.exe - ODBC Data Source Administrator" width="461" height="415" /></p>
<p>The drivers can be downloaded from the following pages on the Microsoft site:</p>
<p><a title="How to obtain the latest service pack for the Microsoft Jet 4.0 Database Engine" href="http://support.microsoft.com/kb/239114/" target="_blank">Excel 97-2003 Jet 4.0 driver</a></p>
<p><a title="2007 Office System Driver: Data Connectivity Components" href="http://www.microsoft.com/downloads/details.aspx?familyid=7554F536-8C28-4598-9B72-EF94E038C891&amp;displaylang=en" target="_blank">Excel 2007 ACE driver &#8211; 12.00.6423.1000</a></p>
<p><a title="2010 Office System Driver Beta: Data Connectivity Components" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=C06B8369-60DD-4B64-A44B-84B371EDE16D&amp;displaylang=en" target="_blank">Excel 2010 ACE driver (beta) &#8211; 14.00.4732.1000</a></p>
<p><strong>Sidenote:</strong> the Excel 2010 driver is not supported on Windows XP, but I was able to query the 2010 Excel sheet using the 2007 driver.  I guess that this is the result of the <a title="Wikipedia: Office Open XML" href="http://en.wikipedia.org/wiki/Office_Open_XML" target="_blank">Office Open XML standard</a> which was introduced in Office 2007.</p>
<p><strong>Driver backward-compatibility</strong></p>
<p>The ACE drivers are backwards-compatible.  So the following queries are working perfectly:</p>
<pre class="code"><span style="color: green;">--old Excel with new ACE driver - working query 1
</span><span style="color: blue;">SELECT </span><span style="color: gray;">* </span><span style="color: green;">--INTO #productlist
</span><span style="color: blue;">FROM OPENROWSET</span><span style="color: gray;">(</span><span style="color: red;">'Microsoft.ACE.OLEDB.12.0'</span><span style="color: gray;">,
    </span><span style="color: red;">'Excel 8.0;HDR=YES;Database=C:\temp\Products.xls'</span><span style="color: gray;">,
    </span><span style="color: red;">'SELECT * FROM [ProductList$]'</span><span style="color: gray;">);

</span><span style="color: green;">--old Excel with new ACE driver - working query 2
</span><span style="color: blue;">SELECT </span><span style="color: gray;">* </span><span style="color: green;">--INTO #productlist
</span><span style="color: blue;">FROM OPENROWSET</span><span style="color: gray;">(</span><span style="color: red;">'Microsoft.ACE.OLEDB.12.0'</span><span style="color: gray;">,
    </span><span style="color: red;">'Excel 12.0;HDR=YES;Database=C:\temp\Products.xls'</span><span style="color: gray;">,
    </span><span style="color: red;">'SELECT * FROM [ProductList$]'</span><span style="color: gray;">);</span></pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>In other words, you won’t be needing that first link for the Jet driver.  For the full story have a look at <a title="How to get a x64 version of Jet?" href="http://blogs.msdn.com/psssql/archive/2010/01/21/how-to-get-a-x64-version-of-jet.aspx" target="_blank">this blog post by Adam Saxton</a> of the CSS SQL Server Escalation Services team.</p>
<h3>The 64-bit Story</h3>
<p>So, what if you’re running a 64-bit OS?  I’ll start by saying that I had quite some issues getting OPENROWSET to work, but finally I managed it.  Following is a list of my attempts, each time with the resulting message.  And finally I’ll show you how I got it to work.  The problem was something really unexpected…</p>
<p><strong>ACE 14 64-bit through SSMS</strong></p>
<p>My main laptop is running Windows 7 64-bit, Office 2010 64-bit and SQL Server 2008 R2 64-bit.  So I installed the 64-bit version of the ACE 14 driver, which happens to be the first OLE DB driver for Excel that ships in 64-bit.  But when I execute my query I’m getting the following message:</p>
<blockquote><p><span style="color: #ff0000;">Msg 7403, Level 16, State 1, Line 1</span></p>
<p><span style="color: #ff0000;">The OLE DB provider &#8220;Microsoft.ACE.OLEDB.14.0&#8243; has not been registered.</span></p></blockquote>
<p>Is this because SSMS ships only in 32-bit?  Maybe, but I’m not able to install the 32-bit driver.  It doesn’t allow me to because I’ve got Office in 64-bit installed.  The installer throws me the following error:</p>
<p><img style="display: inline; border-width: 0px;" title="Microsoft Access database engine 2010 (beta) - You cannot install the 32-bit version of Access Database engine for Microsoft Office 2010 because you currently have 64-bit Office products installed..." src="http://blog.hoegaerden.be/wp-content/uploads/image210.png" border="0" alt="Microsoft Access database engine 2010 (beta) - You cannot install the 32-bit version of Access Database engine for Microsoft Office 2010 because you currently have 64-bit Office products installed..." width="416" height="218" /></p>
<p><strong>ACE 12 32-bit on a 64-bit machine</strong></p>
<p>When I check the installed drivers using the 32-bit version of the ODBC Data Source Administrator (located in C:\Windows\SysWOW64), I notice that the ACE 12 driver is installed.  However, trying to use that one from the Management Studio gives me this:</p>
<blockquote><p><span style="color: #ff0000;">Msg 7399, Level 16, State 1, Line 1</span></p>
<p><span style="color: #ff0000;">The OLE DB provider &#8220;Microsoft.ACE.OLEDB.12.0&#8243; for linked server &#8220;(null)&#8221; reported an error. The provider did not give any information about the error.</span></p>
<p><span style="color: #ff0000;">Msg 7330, Level 16, State 2, Line 1 </span></p>
<p><span style="color: #ff0000;">Cannot fetch a row from OLE DB provider &#8220;Microsoft.ACE.OLEDB.12.0&#8243; for linked server &#8220;(null)&#8221;.</span></p></blockquote>
<p>The Results pane shows all the columns with the right column names, retrieved from Excel.  But the driver seems to have a problem retrieving the actual data.</p>
<p>This issue with error 7330 is mentioned <a title="OPENROWSET with Excel 2007 -- 7330 Cannot fetch a row from OLE DB provider &quot;Microsoft.ACE.OLEDB.12.0&quot; for linked server &quot;(null)&quot;" href="http://social.msdn.microsoft.com/Forums/en-US/sqldataaccess/thread/8514b4bb-945a-423b-98fe-a4ec4d7366ea" target="_blank">in the following thread</a> on the SQL Server MSDN forum, but unfortunately the proposed solution didn’t solve the problem in my case.</p>
<p><strong>64-bit SQLCMD using ACE 14 driver</strong></p>
<p>I also tried using the 64-bit version of <a title="BOL2008: sqlcmd Utility" href="http://msdn.microsoft.com/en-us/library/ms162773.aspx" target="_blank">sqlcmd.exe</a>, but strangely enough that throws the same error.</p>
<p><a href="http://blog.hoegaerden.be/wp-content/uploads/image211.png"><img style="display: inline; border-width: 0px;" title="Using sqlcmd 64-bit to query Excel" src="http://blog.hoegaerden.be/wp-content/uploads/image_thumb55.png" border="0" alt="Using sqlcmd 64-bit to query Excel" width="688" height="377" /></a></p>
<p>I actually expected this last method to work, after all, everything is now running in 64-bit.  But alas, it didn’t…</p>
<p><strong>One more go…</strong></p>
<p>After some more trial and error, I have actually found a way to get the query to work.  I don’t have a logical explanation on why it’s behaving the way it is, but, well, it is working…</p>
<p>This query is running fine:</p>
<pre class="code"><span style="color: blue;">SELECT </span><span style="color: gray;">* </span><span style="color: green;">--INTO #productlist
</span><span style="color: blue;">FROM OPENROWSET</span><span style="color: gray;">(</span><span style="color: red;">'Microsoft.ACE.OLEDB.12.0'</span><span style="color: gray;">,
    </span><span style="color: red;">'Excel 12.0 Xml;HDR=YES;Database=C:\temp\Products.xlsx'</span><span style="color: gray;">,
    </span><span style="color: red;">'SELECT * FROM [ProductList$]'</span><span style="color: gray;">);</span></pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>But this one isn’t:</p>
<pre class="code"><span style="color: green;">--Excel 2007-2010
</span><span style="color: blue;">SELECT </span><span style="color: gray;">* </span><span style="color: green;">--INTO #productlist
</span><span style="color: blue;">FROM OPENROWSET</span><span style="color: gray;">(</span><span style="color: red;">'Microsoft.ACE.OLEDB.12.0'</span><span style="color: gray;">,
    </span><span style="color: red;">'Excel 12.0 Xml;HDR=YES;Database=C:\temp\Products.xlsx'</span><span style="color: gray;">,
    </span><span style="color: red;">'SELECT * FROM [ProductList$]'</span><span style="color: gray;">);</span></pre>
<p>It’s exactly the same query, only difference is the comment line at the start.  And even weirder, if I add a space after the double-dash, the query works fine as well!</p>
<p>Then I decided to remove the commented INTO clause.  This made the weird behavior disappear.  So for some reason SQL Server doesn’t like the OPENROWSET function combined with comments inside the query.  The strange behavior also disappears when a space is added between the double-dash and the INTO keyword.</p>
<p>Uh, computers can be so much fun, right? <img src='http://blog.hoegaerden.be/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>If anyone has got an explanation on this strange behavior: please do post a comment!  For now my conclusion is: don’t use comments when creating an OPENROWSET query.</p>
<p><strong><span style="text-decoration: underline;">IMPORTANT UPDATE (April 11, 2010)</span>: it seems that the current installer for the ACE 14 driver contains a bug and registers it as being “Microsoft.ACE.OLEDB.12.0” instead of “Microsoft.ACE.OLEDB.14.0” .  This explains some of the issues shown above.  Some evidence on the issue:</strong></p>
<p><strong><a title="Access Database Engine 2010 installation issue to use with ADO access technology to access data from Jet database (.mdb files)" href="https://connect.microsoft.com/data/feedback/details/541090/access-database-engine-2010-installation-issue-to-use-with-ado-access-technology-to-access-data-from-jet-database-mdb-files?wa=wsignin1.0" target="_blank">Microsoft Connect: Access Database Engine 2010 installation issue to use with ADO access technology to access data from Jet database (.mdb files)</a></strong></p>
<p><strong><a title="The 'Microsoft.ACE.OLEDB.14.0' provider is not registered ....." href="http://forums.devarticles.com/microsoft-access-development-49/the-microsoft-ace-oledb-14-0-provider-is-not-registered-238601.html" target="_blank">The &#8216;Microsoft.ACE.OLEDB.14.0&#8242; provider is not registered &#8230;.. (see last comment)</a></strong></p>
<p><strong><a title="Excel Services, ODC and Microsoft.ACE.OLEDB.14.0" href="http://blog.sharepointalist.com/2010/03/odc-microsoft-ace-oledb-14-0.html" target="_blank">Excel Services, ODC and Microsoft.ACE.OLEDB.14.0</a></strong></p>
<h2>Conclusion</h2>
<p>The above has shown that OPENROWSET() can be a useful function, given the right circumstances.  But in the wrong setting it can be quite cumbersome to get to work.</p>
<p>I would recommend this method only for one-off quick imports, such as when you as a developer are given a bunch of data in a spreadsheet and need to get it into the database, one way or another.  I would not use it for an automated import process.  For that we’ve got a more interesting alternative which I’ll cover <a title="Importing Excel Data Using Integration Services" href="http://blog.hoegaerden.be/2010/04/20/importing-excel-data-using-integration-services/">in an upcoming article</a>.</p>
<p>Have fun!</p>
<p>Valentino.</p>
<p><strong>References</strong></p>
<p><a title="BOL 2008: Special Table Types" href="http://msdn.microsoft.com/en-us/library/ms186986.aspx" target="_blank">BOL 2008: Special Table Types (incl. temporary tables)</a></p>
<p><a title="BOL 2008: OPENROWSET() function" href="http://msdn.microsoft.com/en-us/library/ms190312.aspx" target="_blank">BOL 2008: OPENROWSET() function</a></p>
<p><a title="BOL 2008: the INTO clause" href="http://msdn.microsoft.com/en-us/library/ms188029.aspx" target="_blank">BOL 2008: the INTO clause</a></p>
<p><a title="How to get a x64 version of Jet?" href="http://blogs.msdn.com/psssql/archive/2010/01/21/how-to-get-a-x64-version-of-jet.aspx" target="_blank">CSS SQL Server Engineers: How to get a x64 version of Jet?</a></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fblog.hoegaerden.be%2F2010%2F03%2F29%2Fretrieving-data-from-excel%2F&amp;title=Retrieving%20Data%20From%20Excel" id="wpa2a_8"><img src="http://blog.hoegaerden.be/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.hoegaerden.be/2010/03/29/retrieving-data-from-excel/feed/</wfw:commentRss>
		<slash:comments>42</slash:comments>
		</item>
		<item>
		<title>The Excel Auto Fill Feature</title>
		<link>http://blog.hoegaerden.be/2010/02/20/the-excel-auto-fill-feature/</link>
		<comments>http://blog.hoegaerden.be/2010/02/20/the-excel-auto-fill-feature/#comments</comments>
		<pubDate>Sat, 20 Feb 2010 21:29:08 +0000</pubDate>
		<dc:creator>Valentino Vranken</dc:creator>
				<category><![CDATA[Office]]></category>
		<category><![CDATA[Excel]]></category>

		<guid isPermaLink="false">http://blog.hoegaerden.be/2010/02/20/the-excel-auto-fill-feature/</guid>
		<description><![CDATA[A couple of days ago I discovered a very interesting double-click feature in Excel. One that probably already exists for ages &#8211; the oldest version that I was able to try it out on is Excel 2002 and it worked &#8211; but due to being used to other habits I just never found out about [...]]]></description>
			<content:encoded><![CDATA[<p>A couple of days ago I discovered a very interesting double-click feature in Excel. One that probably already exists for ages &#8211; the oldest version that I was able to try it out on is Excel 2002 and it worked &#8211; but due to being used to other habits I just never found out about it.&#160; Until now.</p>
<p>When a cell (or a range of cells) is selected, you see a thicker black border around the selection and the bottom-right corner has got a small square attached.</p>
<p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="One cell selected in Excel" border="0" alt="One cell selected in Excel" src="http://blog.hoegaerden.be/wp-content/uploads/image188.png" width="405" height="174" /> </p>
<p>You can drag that squared corner down to get copy-like behaviour. More precisely, when one cell is selected and you drag it down then the value of the selected cell gets copied over into the cells further down, up until the cell where you stop dragging.</p>
<p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="The effect of dragging the squared corner with one cell selected" border="0" alt="The effect of dragging the squared corner with one cell selected" src="http://blog.hoegaerden.be/wp-content/uploads/image189.png" width="450" height="155" /> </p>
<p><strong>Note:</strong> the same effect also works horizontally but in real-life circumstances you probably won’t need it much.</p>
<p>When multiple cells are selected and you drag the bottom-right corner down, Excel will apply some logic to continue the series that it possibly detects.</p>
<p>For instance if you have two cells selected with the values 2 and 4, the next cells will get 6, 8, and so on. Or when the first cell contains 2010/10/30 and the second 2010/10/25, the next cells will get date values going down by 5 days per cell.</p>
<p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Excel&#39;s Auto Fill with two rows and two cells per row selected" border="0" alt="Excel&#39;s Auto Fill with two rows and two cells per row selected" src="http://blog.hoegaerden.be/wp-content/uploads/image190.png" width="450" height="272" /> </p>
<p>If you don&#8217;t like the way the series gets applied, there&#8217;s a dropdown poping up at the bottom-right of the new selection at the moment that you stop dragging. In that list you get several different Auto Fill Options, depending on the data type of your selected cells.</p>
<p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="The Auto Fill Options" border="0" alt="The Auto Fill Options" src="http://blog.hoegaerden.be/wp-content/uploads/image191.png" width="387" height="483" /> </p>
<p>I&#8217;m sure this is no news to you so far.</p>
<p>But do you know what happens when you just<strong> double-click</strong> that small bottom-right corner instead of dragging it?</p>
<p>I didn&#8217;t, until I just tried it out this past week. The reason that I tried this was because I needed a formula copied down in about 20,000 rows (hey, I&#8217;m a data guy, remember?) and I didn&#8217;t want to waste my time waiting for Excel to scroll down just to the bottom of the list while dragging the corner. So I double-clicked and there came the discovery of the week! It applied the same function as what you get when you drag the corner down, all the way down to the last row of data! Isn&#8217;t that great? From now on I think I&#8217;ll always just double-click instead of drag, much faster!</p>
<p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="The Auto Fill effect after double-clicking the small squared corner (I still wonder what name they&#39;ve given this feature - the Auto Fill Corner possibly?)" border="0" alt="The Auto Fill effect after double-clicking the small squared corner (I still wonder what name they&#39;ve given this feature - the Auto Fill Corner possibly?)" src="http://blog.hoegaerden.be/wp-content/uploads/image192.png" width="609" height="242" /> </p>
<p>And you even get the same popup to select another Fill Option.</p>
<p>Have Fun!</p>
<p>Valentino.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fblog.hoegaerden.be%2F2010%2F02%2F20%2Fthe-excel-auto-fill-feature%2F&amp;title=The%20Excel%20Auto%20Fill%20Feature" id="wpa2a_10"><img src="http://blog.hoegaerden.be/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.hoegaerden.be/2010/02/20/the-excel-auto-fill-feature/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

