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 to EXcel 2007 using SQL Server 2005 Express

Author  Topic 

Arunsri
Starting Member

1 Post

Posted - 2007-12-05 : 01:54:18
How to export data from SQL Serevr 2005 Express to Excel 2007 using OPENROWSET command.

I have tried the following code But getting error
sSQL.Format("insert into OPENROWSET(\'Microsoft.JET.OLEDB.4.0\',\'Excel 8.0;Database=%s;\','Select * from [%s$]') select * from [%s]", sExcelPath, sSheetName, sTable);

But getting the following error

The OLE DB provider "MICROSOFT.ACE.OLEDB.12.0" for linked server "(null)" reported an error

Any help is appreciated

Thanks
Arun

   

- Advertisement -