RangeCoordinates Class

The four integer coordinates used to select a contiguous range.


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

public sealed class RangeCoordinates

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.

//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]);

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