Friday, August 5, 2011

OPENROWSET xlsx sql-server data transfer to excel

tested code for  OPENROWSET xlsx sql-server data transfer to excel as following:-
 
 
SELECT
* FROM OPENROWSET('MSDASQL','DRIVER=Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb);

UID=admin;UserCommitSync=Yes;Threads=3;SafeTransactions=0;ReadOnly=1;PageTimeout=5;MaxScanRows=8;

MaxBufferSize=2048;FIL=excel 12.0;DriverId=1046;DefaultDir=c:/;DBQ=

c:\allprogram.xlsx'

, 'SELECT * FROM [Sheet1$]')
 
 
 

No comments: