dbTalk Databases Forums  

Help! I need a simple way to import an Excel file...

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


Discuss Help! I need a simple way to import an Excel file... in the microsoft.public.sqlserver.dts forum.



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

Default Help! I need a simple way to import an Excel file... - 12-22-2005 , 05:39 PM






Hi,

I recently upgraded my dev machine to SQL 2005. It's the only machine on
our network that's running SQL 2005; everything else is on SQL 2000. It's
been a bit of a struggle getting used to the new management console, but
mostly liveable. However, now I'm getting totally frustrated by something
that seems like it should be incredibly simple.

I need to import a spreadsheet into a database that resides on one of our
SQL 2000 servers. I've done this a million times in SQL2K - go to the table
list for that database, right-mouse click on the table list, select Import
Data and go from there. Maybe I was just lazy, because I've never really
bothered learning the bcp syntax - it hasn't been a big deal. So now, of
course, I try to do the same thing and that option isn't there. And the
more I dig, the more it starts to look as if I HAVE to use bcp, or, God help
me, SSIS inside a Visual Studio project, which looks like shooting a mouse
with an elephant gun.

So, is there an easy way to import a spreadsheet to a SQL2K (or SQL 2005)
database? I have tried bcp (have to have an existing table created that you
import into; not difficult, but not as simple as before), OPENDATASOURCE
(tells me I have an invalid table name), and looked at SSIS. FYI: These
Aren't Easy. And, in case I'm stuck w/ the OPENDATASOURCE method, here's
the code I was using:

SELECT *
FROM OpenDataSource( 'Microsoft.Jet.OLEDB.4.0',
'Data Source="c:\WebsiteApproval.xls";
User ID=Admin;Password=;Extended properties=Excel
8.0')...WebsiteApproval

It seems to open the spreadsheet correctly, but it doesn't recognize the
TableName (the last item). The only sheet is named WebsiteApproval, and
there are no named ranges.

Please, could somebody give me some good news!

Thanks in advance, and I'm sorry for venting,

Jim



Reply With Quote
  #2  
Old   
Darren Green
 
Posts: n/a

Default Re: Help! I need a simple way to import an Excel file... - 12-23-2005 , 03:31 AM






In SSMS, right-click the DB, Tasks, Import Data...
This will invoke the wizard, which builds a SSIS package for you in much the
same way that the wizard in SQL 2000 built a DTS package.


--
Darren Green
http://www.sqldts.com
http://www.sqlis.com

"Jim" <floopdog (AT) bodiddy (DOT) com> wrote

Quote:
Hi,

I recently upgraded my dev machine to SQL 2005. It's the only machine on
our network that's running SQL 2005; everything else is on SQL 2000. It's
been a bit of a struggle getting used to the new management console, but
mostly liveable. However, now I'm getting totally frustrated by something
that seems like it should be incredibly simple.

I need to import a spreadsheet into a database that resides on one of our
SQL 2000 servers. I've done this a million times in SQL2K - go to the
table list for that database, right-mouse click on the table list, select
Import Data and go from there. Maybe I was just lazy, because I've never
really bothered learning the bcp syntax - it hasn't been a big deal. So
now, of course, I try to do the same thing and that option isn't there.
And the more I dig, the more it starts to look as if I HAVE to use bcp,
or, God help me, SSIS inside a Visual Studio project, which looks like
shooting a mouse with an elephant gun.

So, is there an easy way to import a spreadsheet to a SQL2K (or SQL 2005)
database? I have tried bcp (have to have an existing table created that
you import into; not difficult, but not as simple as before),
OPENDATASOURCE (tells me I have an invalid table name), and looked at
SSIS. FYI: These Aren't Easy. And, in case I'm stuck w/ the
OPENDATASOURCE method, here's the code I was using:

SELECT *
FROM OpenDataSource( 'Microsoft.Jet.OLEDB.4.0',
'Data Source="c:\WebsiteApproval.xls";
User ID=Admin;Password=;Extended properties=Excel
8.0')...WebsiteApproval

It seems to open the spreadsheet correctly, but it doesn't recognize the
TableName (the last item). The only sheet is named WebsiteApproval, and
there are no named ranges.

Please, could somebody give me some good news!

Thanks in advance, and I'm sorry for venting,

Jim




Reply With Quote
  #3  
Old   
Jim
 
Posts: n/a

Default Re: Help! I need a simple way to import an Excel file... - 12-23-2005 , 11:22 AM



That certainly fits the criteria of "easy". Thank you very much.

"Darren Green" <darren.green (AT) reply-to-newsgroup-sqldts (DOT) com> wrote

Quote:
In SSMS, right-click the DB, Tasks, Import Data...
This will invoke the wizard, which builds a SSIS package for you in much
the same way that the wizard in SQL 2000 built a DTS package.


--
Darren Green
http://www.sqldts.com
http://www.sqlis.com

"Jim" <floopdog (AT) bodiddy (DOT) com> wrote in message
news:eSOwzB1BGHA.1028 (AT) TK2MSFTNGP11 (DOT) phx.gbl...
Hi,

I recently upgraded my dev machine to SQL 2005. It's the only machine on
our network that's running SQL 2005; everything else is on SQL 2000.
It's been a bit of a struggle getting used to the new management console,
but mostly liveable. However, now I'm getting totally frustrated by
something that seems like it should be incredibly simple.

I need to import a spreadsheet into a database that resides on one of our
SQL 2000 servers. I've done this a million times in SQL2K - go to the
table list for that database, right-mouse click on the table list, select
Import Data and go from there. Maybe I was just lazy, because I've never
really bothered learning the bcp syntax - it hasn't been a big deal. So
now, of course, I try to do the same thing and that option isn't there.
And the more I dig, the more it starts to look as if I HAVE to use bcp,
or, God help me, SSIS inside a Visual Studio project, which looks like
shooting a mouse with an elephant gun.

So, is there an easy way to import a spreadsheet to a SQL2K (or SQL 2005)
database? I have tried bcp (have to have an existing table created that
you import into; not difficult, but not as simple as before),
OPENDATASOURCE (tells me I have an invalid table name), and looked at
SSIS. FYI: These Aren't Easy. And, in case I'm stuck w/ the
OPENDATASOURCE method, here's the code I was using:

SELECT *
FROM OpenDataSource( 'Microsoft.Jet.OLEDB.4.0',
'Data Source="c:\WebsiteApproval.xls";
User ID=Admin;Password=;Extended properties=Excel
8.0')...WebsiteApproval

It seems to open the spreadsheet correctly, but it doesn't recognize the
TableName (the last item). The only sheet is named WebsiteApproval, and
there are no named ranges.

Please, could somebody give me some good news!

Thanks in advance, and I'm sorry for venting,

Jim






Reply With Quote
  #4  
Old   
JL Morrison
 
Posts: n/a

Default Re: Help! I need a simple way to import an Excel file... - 02-06-2006 , 03:36 PM



You can also call the import/export wizard from SQL management studio by
right-clicking the database...tasks....import/export. You can execute
immediately or save the package (and edit with VS2005 aka elephant gun)

JL

"Jim" <floopdog (AT) bodiddy (DOT) com> wrote

Quote:
That certainly fits the criteria of "easy". Thank you very much.

"Darren Green" <darren.green (AT) reply-to-newsgroup-sqldts (DOT) com> wrote in
message news:OEChOP6BGHA.1028 (AT) TK2MSFTNGP11 (DOT) phx.gbl...
In SSMS, right-click the DB, Tasks, Import Data...
This will invoke the wizard, which builds a SSIS package for you in much
the same way that the wizard in SQL 2000 built a DTS package.


--
Darren Green
http://www.sqldts.com
http://www.sqlis.com

"Jim" <floopdog (AT) bodiddy (DOT) com> wrote in message
news:eSOwzB1BGHA.1028 (AT) TK2MSFTNGP11 (DOT) phx.gbl...
Hi,

I recently upgraded my dev machine to SQL 2005. It's the only machine
on our network that's running SQL 2005; everything else is on SQL 2000.
It's been a bit of a struggle getting used to the new management
console, but mostly liveable. However, now I'm getting totally
frustrated by something that seems like it should be incredibly simple.

I need to import a spreadsheet into a database that resides on one of
our SQL 2000 servers. I've done this a million times in SQL2K - go to
the table list for that database, right-mouse click on the table list,
select Import Data and go from there. Maybe I was just lazy, because
I've never really bothered learning the bcp syntax - it hasn't been a
big deal. So now, of course, I try to do the same thing and that option
isn't there. And the more I dig, the more it starts to look as if I HAVE
to use bcp, or, God help me, SSIS inside a Visual Studio project, which
looks like shooting a mouse with an elephant gun.

So, is there an easy way to import a spreadsheet to a SQL2K (or SQL
2005) database? I have tried bcp (have to have an existing table
created that you import into; not difficult, but not as simple as
before), OPENDATASOURCE (tells me I have an invalid table name), and
looked at SSIS. FYI: These Aren't Easy. And, in case I'm stuck w/ the
OPENDATASOURCE method, here's the code I was using:

SELECT *
FROM OpenDataSource( 'Microsoft.Jet.OLEDB.4.0',
'Data Source="c:\WebsiteApproval.xls";
User ID=Admin;Password=;Extended properties=Excel
8.0')...WebsiteApproval

It seems to open the spreadsheet correctly, but it doesn't recognize the
TableName (the last item). The only sheet is named WebsiteApproval, and
there are no named ranges.

Please, could somebody give me some good news!

Thanks in advance, and I'm sorry for venting,

Jim








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.