Hi,Can someone please help me?When i run the query below i get the error in red. However, if i change the sheetname to only catalog than it seems to be working fine. The problem is that i can't ask the user to change the sheetname and also i would like to know how to solve this error .The OLE DB provider "Microsoft.Jet.OleDB.4.0" for linked server "(null)" does not contain the table "catalog SU08$". The table either does not exist or the current user does not have permissions on that table. declare @SheetName varchar(20) declare @FilePath varchar(100) declare @HDR varchar(3) set @FilePath='c:\test\Catalog_big.xls' set @SheetName='catalog SU08$'set @HDR=1 DECLARE @SQL nvarchar(1000) SET @SQL = ' SELECT * INTO #tmptest FROM OPENDATASOURCE' SET @SQL = @SQL + '(''Microsoft.Jet.OLEDB.4.0'',''Data Source=' SET @SQL = @SQL + @FilePath + ';Extended Properties=''''Excel 8.0;HDR=' SET @SQL = @SQL + @HDR + ''''''')...[' SET @SQL = @SQL + @SheetName + ']' EXEC sp_executesql @SQL
Whisky-my beloved dog who died suddenly on the 29/06/06-I miss u so much.