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
 SQL Server 2005 Forums
 Transact-SQL (2005)
 export SQLServer 2005 table to Excel 2007

Author  Topic 

rum23
Yak Posting Veteran

77 Posts

Posted - 2009-04-01 : 10:19:41

What is code to do an export of sqlserver 2005 table data to Excel 2007? Also, can you do an import from Excel 2007 to SQL Server 2005? If so, please let me know.

Thanks much

rum23

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2009-04-02 : 05:15:04
"Provider=Microsoft.ACE.OLEDB.12.0;" & _
"Data Source=" & GetExcelFileName().ToString & ";" & _
"Extended Properties='Excel 12.0 Xml;HDR=YES';"

from

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=49926

Madhivanan

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

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2009-04-02 : 05:16:31
Also refer
http://connectionstrings.com/excel-2007

Madhivanan

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

- Advertisement -