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.
| Author |
Topic |
|
tommiwan
Starting Member
2 Posts |
Posted - 2008-10-01 : 11:54:38
|
| I used excel to create a connection to SQL server. I can view my table in excel, but now I would like to add rows to the table and publish those changes back to SQL server. Is this possible? I am using excel 2007, and SQL server 2008.In case you are wondering we have automated test scripts that read from the SQL table, and we want users who do not know T-sql to be able to add rows for the automated tests to process. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-10-01 : 13:12:11
|
You can do that. just use OPENROWSEThttp://msdn.microsoft.com/en-us/library/ms190312.aspxit will be something likeINSERT INTO TableSELECT fields FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0','Excel 8.0;Database=fullpath\yourexcelfilename.xls', [Yoursheetname$]) |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-10-01 : 13:17:20
|
| here's a kb article explaining various methodshttp://support.microsoft.com/kb/321686 |
 |
|
|
tommiwan
Starting Member
2 Posts |
Posted - 2008-10-01 : 13:44:56
|
| Thanks, there is a lot of information on how to get data from excel to SQL. I was hoping for something as simple as a "Publish" button like the Visual studio team foundation add in has, but it doesn't appear to be that simple. |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
|
|
|