Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 link excel to sql server and update value from xl

Author  Topic 

learning_grsql
Posting Yak Master

230 Posts

Posted - 2012-08-24 : 07:26:35
Hi,

I would like to know is it possible to link excel file sheet as a sql server table and update values from excel.

User should be able to update value from excel into the sql server table.

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-08-24 : 10:01:11
yep.you can .My preffered method is OPENROWSET though there are several other ways too
see below for options


http://support.microsoft.com/kb/321686



------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

learning_grsql
Posting Yak Master

230 Posts

Posted - 2012-08-25 : 03:37:31
Thanks visakh16...but in all these cases it seems we need to manually import data into sql server table. I was looking for something if user updates value in excel file, it should automatically reflect in sql server table as in the case of access-excel linked tables...
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-08-25 : 13:13:58
for that you need to have a macro inside excel which looks for action (may be when user clicks a button) and then update a table using OPENROWSET

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

learning_grsql
Posting Yak Master

230 Posts

Posted - 2012-10-13 : 08:03:06
Thanks @visakh16

Now I want to import .xlsx(excel 2007) in sql server 2005 using openrowset method? As far as I learned from the above link, it seems in sql server 2005, we can only import .xls.

Do you think it's possible?
Go to Top of Page
   

- Advertisement -