EXECUTE sp_configure 'show advanced options', 1
RECONFIGURE WITH OVERRIDE
GO
EXECUTE sp_configure 'Ad Hoc Distributed Queries', '1'
RECONFIGURE WITH OVERRIDE
GO
EXECUTE sp_configure 'show advanced options', 0
RECONFIGURE WITH OVERRIDE
GO
--insert into tbAll
SELECT *
FROM
OPENROWSET
('Microsoft.ACE.OLEDB.12.0',
'Excel 12.0;Database=C:\Documents and Settings\administrator\Desktop\MRG1.xlsx;Extended Properties=Excel 12.0 XML;HDR=YES',
'SELECT * FROM [Sheet1$]')
--load 2008