Click here to Skip to main content
14,732,830 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,
I have some data in my database.


What i want to do is i have to import the table data to Excel and after doing some changes in Excel sheet i need to update my database according to the changes made in Excel.
Posted
Comments
Karwa_Vivek 9-Aug-13 2:44am
   
why dont you use the IMPORT and EXPORT wizard of SQL Server
Maciej Los 9-Aug-13 3:15am
   
Why do you want to change data using Excel? Please, explain...
bakkupavan 20-Aug-13 14:31pm
   
Actually, i have a large number of columns. So each time Reading,inserting,updating is burden. So i would like to give this table in an Excel file, and ask the users to make their changes and i will read data from that updated excel file to my database table.

SELECT * INTO RECIPENAMES FROM
    openrowset('Microsoft.Jet.OLEDB.4.0','excel 8.0;imex=1;
    database=D:SQL Training\IMPORT\All recipes 13320.xls',[SHEET2$]) T


Note: that Recipenames will be your table name where u gonna insert the data and this code is for 97-2003 excel sheet i.e only for xls files. mention the sheet name. while running the query please close the excel sheet and run.
   
Why Dont you Use the IMPORT and EXPORT TOOL provided with SQL SERVER.
The Tool probably you can find in the Drive you have Installed the SQL Server or in
"C:\Program Files\Microsoft SQL Server\80\Tools\Binn\dtswiz.exe.

Its a Data Transformation Service Provided with SQL Server
   
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900