代码如下:— Get table (worksheet) or column (field) listings from an excel spreadsheet — 设置变量 declare @linkedServerName sysname = ‘TempExcelSpreadsheet’ declare @excelFileUrl nvarchar(1000) = ‘D:\text.xlsx’ — /SET — 删除链接服务(如果它已经存在) if exists(select null from sys.servers where name = @linkedServ