Share via


RangeCoordinates Class

The four integer coordinates used to select a contiguous range.

Inheritance Hierarchy

System.Object
  Microsoft.Office.Excel.Server.WebServices.RangeCoordinates

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

Syntax

'Declaration
Public NotInheritable Class RangeCoordinates
'Usage
Dim instance As RangeCoordinates
public sealed class RangeCoordinates

Remarks

The coordinates include a top row, left column, height and width. Coordinates enable Excel ranges to be specified using direct integer indexing as an alternative to "A1" expressions.

Examples

//Instantiate the Web service and range coordinate object
ExcelService xlservices = new ExcelService();
RangeCoordinates rangeCoordinates = new RangeCoordinates();

//Prepare object to define range coordinates, 
//and GetRange
rangeCoordinates.Column = 8;
rangeCoordinates.Row = 7;
rangeCoordinates.Height = 15;
rangeCoordinates.Width = 9;

object[] rangeResult = xlservice.GetRange(sessionId, sheetName, rangeCoordinates, false, out outStatus);
Console.WriteLine("Total Rows: " + rangeResult.Length);
Console.WriteLine("Value in the range is: " + ((object[])rangeResult[17])[12]);

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

RangeCoordinates Members

Microsoft.Office.Excel.Server.WebServices Namespace