WorksheetAppend

Appends data as a new Worksheet to a Microsoft Excel Workbook

  • Stored Procedure
  • SQL Server Compatibility: 2008, 2012, 2014, 2016, 2017

Syntax:

EXEC SQLHTTP.net.WorksheetAppend @WorkbookPath, @SheetName, @GlobalTableName

Arguments:

Name Type Description
@WorkbookPath nvarchar(4000) The path to a Microsoft Excel Workbook
@SheetName nvarchar(4000) Name of Worksheet to be added to the above Workbook. Default: Sheet1
@GlobalTableName varchar(100) Name of a Global Temporary Table that has been created and populated with data

Remarks:

SQL Server 64 Bit Instances: This function requires the “Microsoft Access Database Engine 2010 Redistributable.” Please see the following for more information: https://www.microsoft.com/en-us/download/details.aspx?id=13255

Sample Usage:

The following example creates and populates a global temporary table called ##Temp which is subsequently appended to an Excel Workbook as a new Worksheet.

See Also: