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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 vab to insert excel into sql table
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

1 Posts

Posted - 08/16/2013 :  16:40:07  Show Profile  Reply with Quote
I need very simple vba code that will insert excel data into a sql table

The sql server is 2005
The server name is myserver
The database is mydatabase

The excel spreadsheet has the field names in row 1 followed by rows of data. I think i can use an ado connection but but haven't been able to figure it out. The excel data will always be in columns A through E on sheet1, but the number of rows will vary. I don't need the macro to check or validate data anything or handle errors

I only ask that you please don't offer alternate ways. The user will be in excel, enter data and run macro.

Desparate and frustrated don't begin to tell you how i'm feeling. All the examples I reserched takes you from SQL into Excel. I'm sure there's a good reasdon for this, but this is the method I have to use.

  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000