473,387 Members | 1,495 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How do I import Excel file into SQL Express???

Hello,

I am total beginner to SQL and want to import an Excel file into SQL but I'm not sure where to start. The Excel file is a small company directory, names, addresses etc., not too big.

Any help would be greatly appreciated!!!!
Apr 28 '07 #1
15 31077
hi..
my adivice is dont use excel, create a MS-Access data base and import that into sql..
May 3 '07 #2
thanks for the post.

Assuming I am able to create an MS Access database, what are the steps to importing this file into SQL?

thanks
May 4 '07 #3
1.right click on any database
2.select TASKS and then select IMPORT DATA after clicking
this one dialog box will appear,click NEXT
3.Choose MICROSOFT ACCESS as DATA SOURCE,then BROWSE ur access file then click NEXT
4.Chosse the DESTINATION[SQL native client]
5.Select the SERVERNAME
6.There are two AUTHENTICATION, select the SQL SERVER AUTHENTICATION and give the USERNAME & PASSWORE
7.Select the DATABASE and then click next
8.select "COPY DATA FROM ONE OR MORE TABLES OR VIEWS" then click next
9.the tables what you created in access will be showed here
10.select the tables which you want to insert and then click next
11.select the "EXECUTE IMMEDIATELY" check box and then click next
12.click finish
13.it takes some time to process and finallY, if there are no mistakes,it executes
successsfuly else it shows the error message
May 5 '07 #4
Tros
1
You can't Import / Export using the Express editions.
Sep 5 '07 #5
You can't Import / Export using the Express editions.
Seems it may be round about, Excel -> Access -> SQL Express.
Nov 5 '07 #6
Hayden
6
When you download the SQL Express software, I believe it comes with a 'wizard' called DTS Wizard. It allows you to transfer among all the previously mentioned types.
Nov 7 '07 #7
onyris
42
Hi .. i just tried to do those steps..but when i go right click on a database and then TASKS ..there is no import data or export or anything.
Can someone tell me another way to import the data from an excel ..or MS Access into SQL .
Thanks
Aug 12 '08 #8
BHTanna
31
Dont you have SQL Enterprise Manager??? Above steps are for the same.

If u want to do the same using SQL Query Analyser, u need to save your excel file on Server's local drive and try following query...

Select * from OPENDATASOURCE('Microsoft.Jet.OLEDB.4.0',
'Data Source=c:\<filename>.xls; Extended Properties=Excel 8.0')...[<sheet name>$]

Hope this will help.
Aug 13 '08 #9
onyris
42
Hi thanks for replay ...but i still have some problems with that..i'm getting this error message when try to run the query :

Msg 7314, Level 16, State 1, Line 1
The OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)" does not contain the table "chemicals$".
The table either does not exist or the current user does not have permissions on that table.

The query looks like this :

Select * from OPENDATASOURCE('Microsoft.Jet.OLEDB.4.0',
'Data Source=c:\Chemical_table.xls; Extended Properties=Excel 8.0')...[chemicals$]

Not sure what i'm doing wrong or what i'm missing ....could u help me again
Thanks
Aug 14 '08 #10
onyris
42
Ah ..i forgot ...i'm using Microsoft SQL Server Management Studio Express
Aug 14 '08 #11
BHTanna
31
Hi,

I hope u have spelled you sheet name correctly...

Request you to rename the sheet which has data to "A" or something very easy....

Other than this, i dont find any other problem..

It should work perfectly....
Aug 14 '08 #12
onyris
42
I just changed the name ...and now i'm getting this error

Msg 7399, Level 16, State 1, Line 1
The OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)" reported an error. The provider did not give any information about the error.
Msg 7303, Level 16, State 1, Line 1
Cannot initialize the data source object of OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)"

Any ideea about this ?
Aug 14 '08 #13
BHTanna
31
Have u changed file path or moved file somewhere else???

It seems, your file does not exists now, may be you have chenged path or renamed it???

Or is it opened??? Then too u will get this error...

If it is in sharing, & used by someone else then too u will get this error...
Aug 14 '08 #14
onyris
42
the file is there ..i'm using the same names..but still getting the first error

Msg 7314, Level 16, State 1, Line 1
The OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)" does not contain the table "a$".
The table either does not exist or the current user does not have permissions on that table


I have no ideea what is wrong.
Aug 15 '08 #15
BHTanna
31
Now you are getting first error..

I suggest you to keep your excel file in c:\ of your server and simply try..

It seems you are violating some basic file sharing rules...

As this error indicates, either u dont have rights on this sheet or sheet doesnt exists.

Hope this will help.
Aug 15 '08 #16

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: Johnny | last post by:
I was looking for information on how to import an excel file or other text file into a MySql database. I have done this with both access and SQL Server and am looking for a way to do this in...
3
by: fkulaga | last post by:
Hi all, I have a problem with the issue in the subject, i have all data in one big excel file, in a denormalized form, and on the other side, i have mysql database with many tables, which is...
1
by: Steve | last post by:
Hi All, I have an Excel file being delivered to a shared drive where I only have read access on a daily basis. The files arrive in the following format 'Filename+timestamp.xls' Example:...
8
by: qfchen | last post by:
Hi, A piece of simple code to import excel file to a database, as shown below, I have problem when I tried to open the connection, the error message shows Excel driver is not correct. where shall...
2
by: jitendrawel | last post by:
how can be import excel file in mysql database through PHP code. Please send me complete code ASAP. Thanks. Best regards, Jitendra Kumar
1
by: vikassawant | last post by:
Hi, I want to import Excel file data in JTable.For that I am using following Code, String excelFileName = "Team1.xls"; File file = new File(excelFileName ); //‘file’ is the file you...
1
by: orked | last post by:
i tried to import excel file into gridview but the code made this exception (Failed to map this path''xmlTest.xml") i don't know why my code: public void fillGrid() { DataSet ds =...
4
by: orked | last post by:
i want to import excel file to gridview but there was error(Failed to map this path "/xmltest.xml") and i couldn't handle it my code: public void fillGrid() { DataSet ds = new...
6
by: provor | last post by:
Hello, I have the following code that I am using when a user presses a button to import an excel file into a table. The code is hard coded to point to the correct table. This works great for this...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.