ExcelService.SetRange Method

Sets values into a range, using numeric range coordinates.

Namespace:  Microsoft.Office.Excel.Server.WebServices
Assembly:  Microsoft.Office.Excel.Server.WebServices (in Microsoft.Office.Excel.Server.WebServices.dll)

Syntax

'Declaration
<WebMethodAttribute> _
Public Sub SetRange ( _
    sessionId As String, _
    sheetName As String, _
    rangeCoordinates As RangeCoordinates, _
    rangeValues As Object(), _
    <OutAttribute> ByRef status As Status() _
)
'Usage
Dim instance As ExcelService
Dim sessionId As String
Dim sheetName As String
Dim rangeCoordinates As RangeCoordinates
Dim rangeValues As Object()
Dim status As Status()

instance.SetRange(sessionId, sheetName, _
    rangeCoordinates, rangeValues, status)
[WebMethodAttribute]
public void SetRange(
    string sessionId,
    string sheetName,
    RangeCoordinates rangeCoordinates,
    Object[] rangeValues,
    out Status[] status
)

Parameters

  • sessionId
    Type: System.String
    The Excel Web Services session ID.
  • sheetName
    Type: System.String
    The name of the sheet you want to reference. Sheet name length is limited to 31 characters.
  • rangeValues
    Type: []
    Array of values for the range being set.
  • status
    Type: []
    Alert information.

Remarks

Sets values into a range in the open workbook. Use numeric range coordinates to select the range.

To set a cell to be empty, use Null. If a null object value is passed, the respective cell value will be cleared.

If the dimensionality of the array of values does not exactly match that of the range, the call will be aborted and will return an error.

See Also

Reference

ExcelService Class

ExcelService Members

Microsoft.Office.Excel.Server.WebServices Namespace