The Excel content cannot be correctly imported into SSIS?

Source: Internet
Author: User
Tags ssis

From http://microsoftdw.blogspot.com/, good blog for SSIs

So sometimes you have data that does not come up right in Excel because either it's not formatted, or it's got mixed types. the end of it all is you just need it to come in as text and you can convert it later. my good friend, Robert Skoglund gave me this hint and I dug up some info on it ....

Basically, add the option IMEX = 1 to the connectionstring for excel. This forces the columns to be treated all as text.

This from connectionstrings.com ....

"Provider = Microsoft. Jet. oledb.4.0; Data Source = C:" myexcel.xls; extended properties = "" Excel 8.0; HDR = yes; IMEX = 1 """

"HDR = yes;" indicates that the first row contains columnnames, not data

"IMEX = 1;" tells the driver to always read "intermixed" Data columns as text

Tip! SQL Syntax: "select * from [sheet1 $]"-I. e. worksheet name followed by a "$" and wrapped in "[" "]" brackets.

From Microsoft .....

Http://msdn2.microsoft.com/en-us/library/ms254500.aspx

Credit, where credit is due ....

Http://www.dicks-blog.com/archives/2004/06/03/external-data-mixed-data-types/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.