dbTalk Databases Forums  

Excel SQL Import

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Excel SQL Import in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Sanka
 
Posts: n/a

Default Excel SQL Import - 06-05-2004 , 05:56 AM






Hi

I need to import data from Excel 2003 to SQl Server

I could see that the first row is always treated as the column headers and the data from the second row is assumed to be the real data

Actually in my Excel File, we have some author and File information in the first two lines
The column headers and the data start from Line 3

Is there any way to let the DTS package consider the 3rd row as column headers and data from 4th row

Any help on this would be much appreciated

Cheers
Sanka

Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Excel SQL Import - 06-07-2004 , 02:46 AM






Have a look at the "First Row" property on the last tab of the datapump.
Also, because the Excel driver will get confused with datatypes, in the
Extended Properties of your Excel connection set IMEX=1

Have a look here

Excel Inserts Null Values
(http://www.sqldts.com/default.aspx?254)

--

----------------------------

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"Sanka" <loonysan (AT) mailcity (DOT) com> wrote

Quote:
Hi,

I need to import data from Excel 2003 to SQl Server.

I could see that the first row is always treated as the column headers and
the data from the second row is assumed to be the real data.

Actually in my Excel File, we have some author and File information in the
first two lines.
The column headers and the data start from Line 3.

Is there any way to let the DTS package consider the 3rd row as column
headers and data from 4th row.

Any help on this would be much appreciated.

Cheers,
Sanka



Reply With Quote
  #3  
Old   
Rand Boyd [MSFT]
 
Posts: n/a

Default RE: Excel SQL Import - 06-07-2004 , 09:33 AM



If you set a named range in Excel for the data you want to import, when you
design your DTS package the range name should be shown as a source
worksheet to import.

Rand
This posting is provided "as is" with no warranties and confers no rights.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.