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
 Database Design and Application Architecture
 Export excel data to Sql Server

Author  Topic 

dhartikumar
Starting Member

1 Post

Posted - 2012-12-05 : 22:46:51
Hi Experts

Required Excel Vba code to export excel data to my sql Server which are in network the server ip is 172.16.10.175.

if any one know please send me the code. dhartikumar@gmail.com

Thanks & Regards


Dhartikumar Sahu
Sr.Manager - Database
IDBI Capital Market Services

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-12-06 : 01:54:18
why cant you use OENROWSET?

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

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

Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2012-12-24 : 03:57:16
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=49926

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

alfredolopez
Starting Member

1 Post

Posted - 2012-12-29 : 00:11:02
Madhivanan, Did you use the OENROWSET, as Visakh16 said? I think it will help you.


http://www.selogerneuf.com/immobilier/tout/immo-lyon-69/
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2013-01-02 : 02:09:19
quote:
Originally posted by alfredolopez

Madhivanan, Did you use the OENROWSET, as Visakh16 said? I think it will help you.


http://www.selogerneuf.com/immobilier/tout/immo-lyon-69/


Yes. Did you see that link?

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

jackv
Master Smack Fu Yak Hacker

2179 Posts

Posted - 2013-01-03 : 08:36:24
Another approach is Powershell. Read from Excel and push data into SQL Server. Instantiating the Excel is completed through:
New-Object -ComObject Excel.Application
and then you can use New-Object ('Microsoft.SqlServer.Management.Smo.Server') $instance_name to connnect to the SQL server.

Check this link for an example: http://www.sqlserver-dba.com/2013/01/sql-server-export-excel-data-to-sql-server-with-powershell.html


Jack Vamvas
--------------------
http://www.sqlserver-dba.com
Go to Top of Page
   

- Advertisement -