Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
declare @WsheetNameVarChar(100)
declare @WsheetPath VarChar(100)
declare @SQLCommand VarChar(600)
-- set path to worksheets
set @WsheetPath = 'C:\Test\'
set @WsheetName = 'TestSheet.xls'
-- Create a linked server connection to the worksheet.
SET @SQLCommand =
'EXEC master..sp_addlinkedserver '+
'''' + 'Excel' + '''' + ',' +
'''' + 'Jet 4.0' + '''' + ',' +
'''' + 'Microsoft.Jet.OLEDB.4.0' +
'''' + ',' + '''' + @Wsheetpath +
@WsheetName + '''' + ',' +
'NULL,' + '''' + 'Excel 8.0' + ''''
EXEC (@SQLCommand)
-- login to the linked server
EXEC sp_addlinkedsrvlogin 'Excel', FALSE
-- Now that the worksheet is "attached" insert data from table somefile -
INSERT into Excel...Data select * fron somefile
-- Cleanup
EXEC sp_droplinkedsrvlogin 'Excel',NULL
EXEC sp_dropserver 'Excel', NULL