Groups | Blog | Home
all groups > sql server (alternate) > october 2004 >

sql server (alternate) : Best way of importing Excel to SQL Server



nib
10/21/2004 4:17:03 PM
[quoted text, click to view]

DTS Packages are design just for this sort of thing.

Little PussyCat
10/21/2004 10:15:11 PM

Hello,

I nee to write something that will transfer excel data into an SQL Server
table.

I have for another database application I wrote have it importing Excel
spreadsheet data using cell by cell, row by row method. This is fully
automated so the user can choose whatever spreadsheet they want to import
and press a button which sits on a VB6 frontend.
This has been good for that situsation but it can be very slow when there
are large amounts of data to process.

I am just wondering are there any faster, better alternatives that would
still enable a user to select which excel spreadsheet to import
as the application I am writing now will sit on a website frontend, using
ASP, and I'd really like to try and speed things up if I could.

any advice would be much appreciated.

Thankyou,

Oh, and hello, this is my first post here!

jerrykurtz NO[at]SPAM earthlink.net
10/22/2004 6:09:44 AM
[quoted text, click to view]


I second that notion -- however, there are some problems with
importing Excel data into SQL Server.

I've noticed that if you have a column whose first value is numeric,
and then there are other values in that column that are not numeric,
nib
10/22/2004 1:34:10 PM
[quoted text, click to view]

You'd have to investigate exactly how much you can do with it. Even if
DTS requires a hard-coded file name, you could always have your front
end copy the chosen spreadsheet to said name and then run the dts package.

Little PussyCat
10/22/2004 7:40:08 PM

[quoted text, click to view]

Will a DTX package still be as flexible as what I am doing now,
i.e. would a user still be able to browse through a VB6 / webfrontend to the
spreadsheet they want to import,
i.e. can it be coded in VB6 / ASP?
[quoted text, click to view]

There are loads of problems with importing excel into sql server, I've found
if the spreadsheet is not set up as a text format data then strange things
will happen.
Similar when you export from sql server to excel, leading zeros of numeric
data gets dropped etc...
Anyway,
Enough of that, thanks

Jayne
AddThis Social Bookmark Button