<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.0.7" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Excel &#038; SSIS (Part 1)</title>
	<link>http://www.proteanit.com/b/2007/01/15/excel-ssis/</link>
	<description>pro·te·an   (prō'tē-ən, prō-tē'-)  "Exhibiting considerable versatility or diversity"</description>
	<pubDate>Fri, 30 Jul 2010 20:51:56 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.7</generator>

	<item>
		<title>by: FB</title>
		<link>http://www.proteanit.com/b/2007/01/15/excel-ssis/#comment-462</link>
		<pubDate>Wed, 02 Apr 2008 13:38:12 +0000</pubDate>
		<guid>http://www.proteanit.com/b/2007/01/15/excel-ssis/#comment-462</guid>
					<description>Setting IMEX=1 can solve the problem, but not always. For this to work the excel sheet must be correctly formatted in the first place. So all cells need to be in text format, and simply formatting the cells alone isn't always enough. You have re-enter the values after...

Lastly, even if you have correctly formatted the spreadsheet to text, reentered the values and set IMEX=1 in your connection string, it may still fail if your datatypes change after the initial sampling of rows. i.e. If you have numbers in your first 8 records and then a string after, it will still expect numeric data.

A royal pain in the a$£e!</description>
		<content:encoded><![CDATA[<p>Setting IMEX=1 can solve the problem, but not always. For this to work the excel sheet must be correctly formatted in the first place. So all cells need to be in text format, and simply formatting the cells alone isn&#8217;t always enough. You have re-enter the values after&#8230;</p>
<p>Lastly, even if you have correctly formatted the spreadsheet to text, reentered the values and set IMEX=1 in your connection string, it may still fail if your datatypes change after the initial sampling of rows. i.e. If you have numbers in your first 8 records and then a string after, it will still expect numeric data.</p>
<p>A royal pain in the a$£e!
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: David Wynne</title>
		<link>http://www.proteanit.com/b/2007/01/15/excel-ssis/#comment-446</link>
		<pubDate>Fri, 28 Mar 2008 11:39:10 +0000</pubDate>
		<guid>http://www.proteanit.com/b/2007/01/15/excel-ssis/#comment-446</guid>
					<description>It also uses the first 8 rows to evaluate the data type of each col, so if the first 8 rows contain strings and the 15th contains a int - the int will be ignored and in it's place you'll get a NULL.  Most annoying.

The best solution I've found is to alter the Excel connection string, appending IMEX=1 to the end, so you end up with:

Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Dir\Source.xls;Extended Properties="EXCEL 8.0;HDR=YES;IMEX=1";

This tells the Jet Driver to use "import mode" which always reads intermixed data columns as text.  Means you might have to do some data conversion in your data flow further down the pipe line, but at least you won't be loosing any data.

(Obviously if you're picking up your spreadsheet dynamically at run time, you'll need to use an expression to build the connection string).</description>
		<content:encoded><![CDATA[<p>It also uses the first 8 rows to evaluate the data type of each col, so if the first 8 rows contain strings and the 15th contains a int - the int will be ignored and in it&#8217;s place you&#8217;ll get a NULL.  Most annoying.</p>
<p>The best solution I&#8217;ve found is to alter the Excel connection string, appending IMEX=1 to the end, so you end up with:</p>
<p>Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Dir\Source.xls;Extended Properties=&#8221;EXCEL 8.0;HDR=YES;IMEX=1&#8243;;</p>
<p>This tells the Jet Driver to use &#8220;import mode&#8221; which always reads intermixed data columns as text.  Means you might have to do some data conversion in your data flow further down the pipe line, but at least you won&#8217;t be loosing any data.</p>
<p>(Obviously if you&#8217;re picking up your spreadsheet dynamically at run time, you&#8217;ll need to use an expression to build the connection string).
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: FB</title>
		<link>http://www.proteanit.com/b/2007/01/15/excel-ssis/#comment-140</link>
		<pubDate>Tue, 29 Jan 2008 11:29:37 +0000</pubDate>
		<guid>http://www.proteanit.com/b/2007/01/15/excel-ssis/#comment-140</guid>
					<description>Also remember that if you are going to use the DT_NTEXT datatype you cannot perform all the string manipulation functions that you can with DT_WSTR. You may need a datatype conversion downstream.</description>
		<content:encoded><![CDATA[<p>Also remember that if you are going to use the DT_NTEXT datatype you cannot perform all the string manipulation functions that you can with DT_WSTR. You may need a datatype conversion downstream.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: baz1976</title>
		<link>http://www.proteanit.com/b/2007/01/15/excel-ssis/#comment-2</link>
		<pubDate>Tue, 16 Jan 2007 00:40:44 +0000</pubDate>
		<guid>http://www.proteanit.com/b/2007/01/15/excel-ssis/#comment-2</guid>
					<description>I was caught out by this one too. Remember that the SSIS designer uses your desktop configurations regardless of which server you are running against. Best way to test is to log on remotely and use the dtexecui tool.</description>
		<content:encoded><![CDATA[<p>I was caught out by this one too. Remember that the SSIS designer uses your desktop configurations regardless of which server you are running against. Best way to test is to log on remotely and use the dtexecui tool.
</p>
]]></content:encoded>
				</item>
</channel>
</rss>
