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
 vab to insert excel into sql table

Author  Topic 

maba1
Starting Member

1 Post

Posted - 2013-08-16 : 16:40:07
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.






   

- Advertisement -