Re: From excel file into MS SQL server
From: Sue Hoegemeier (Sue_H_at_nomail.please)
Date: 02/01/05
- Next message: Steve C. Orr [MVP, MCSD]: "Re: From excel file into MS SQL server"
- Previous message: Simon Hayes: "Re: From excel file into MS SQL server"
- In reply to: no one: "Re: From excel file into MS SQL server"
- Next in thread: Steve C. Orr [MVP, MCSD]: "Re: From excel file into MS SQL server"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 01 Feb 2005 12:38:04 -0700
I'm not sure what all security restrictions they want you to
follow, but one option is to use Openrowset and read the
file into a table using T-SQL, e.g.
insert into YourTable
SELECT * FROM
OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'Excel 8.0; HDR=NO;Database=C:\YourFilet.xls',
'SELECT * FROM [Sheet1$]')
-Sue
On Tue, 01 Feb 2005 12:25:52 GMT, no one <noone@yahoo.com>
wrote:
>Thanks for the link, but this is not what I want to do. I want to put the
>data from the file into a table, not the file itself.
>
>"Steve C. Orr [MVP, MCSD]" wrote:
>
>> Yes you can upload any file directly into SQL Server.
>> Here's an example:
>> http://SteveOrr.net/Articles/EasyUploads.aspx
>>
>> --
>> I hope this helps,
>> Steve C. Orr, MCSD, MVP
>> http://SteveOrr.net
>>
>> "no one" <noone@yahoo.com> wrote in message
>> news:41FEF4E4.7EED35A4@yahoo.com...
>> >I need to find a way to upload an Excel file into an MS SQL database
>> > using a web control front end. I have my ASP.Net control (using C#)
>> > uploading a file to a directory, but the server people now tell me that
>> > I cannot have a writeable area for the web and have a DTS see it as this
>> > is too much of a security risk. So, I need a way to read the file
>> > directly into the database. I've no idea how to do this. Does anyone
>> > have ideas? I know loading MS Office into the web server is out of the
>> > question. The webserver and database server are not the same physical
>> > machine.
>> >
>> > Thanks.
>> >
- Next message: Steve C. Orr [MVP, MCSD]: "Re: From excel file into MS SQL server"
- Previous message: Simon Hayes: "Re: From excel file into MS SQL server"
- In reply to: no one: "Re: From excel file into MS SQL server"
- Next in thread: Steve C. Orr [MVP, MCSD]: "Re: From excel file into MS SQL server"
- Messages sorted by: [ date ] [ thread ]