WorksheetCellUpdate
Updates a cell in a Worksheet of an Excel Workbook
- Stored Procedure
- SQL Server Compatibility: 2008, 2012, 2014, 2016, 2017
EXEC SQLHTTP.net.WorksheetCellUpdate @WorkbookPath, @SheetName, @Cell, @Value
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 |
@Cell | nvarchar(4000) | Cell to be updated in a format such as B5, or BC298 |
@Value | nvarchar(4000) | Value as a string |
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
1 2 3 4 5 6 7 8 9 10 11 12 13 |
DECLARE @WorkbookPath varchar(MAX) DECLARE @SheetName varchar(4000) DECLARE @Cell varchar(4000) DECLARE @Value varchar(4000) SET @WorkbookPath = 'C:\ThisFolderExists\OLEDBProviders.xlsx' SET @SheetName = 'SampleSheet' SET @Cell = 'B2' SET @Value = 'NEW VALUE' EXEC SQLHTTP.net.WorksheetCellUpdate @WorkbookPath, @SheetName, @Cell, @Value |
1 2 3 |
Command(s) completed successfully. |