/// <summary> /// Get the cell range reference given a worksheet name, and a corner cell and its opposite corner cell in a cell /// range. For example "Sheet1!A1:C5" or "Sheet1!$A$1:$C$5". /// </summary> /// <param name="WorksheetName">The worksheet name.</param> /// <param name="StartRowIndex">The row index of the start cell of the cell range. This is typically the top-left cell.</param> /// <param name="StartColumnIndex"> /// The column index of the start cell of the cell range. This is typically the top-left /// cell. /// </param> /// <param name="EndRowIndex">The row index of the end cell of the cell range. This is typically the bottom-right cell.</param> /// <param name="EndColumnIndex"> /// The column index of the end cell of the cell range. This is typically the bottom-right /// cell. /// </param> /// <param name="IsAbsolute">True for absolute reference. False for relative reference.</param> /// <returns>The cell range reference.</returns> public static string ToCellRange(string WorksheetName, int StartRowIndex, int StartColumnIndex, int EndRowIndex, int EndColumnIndex, bool IsAbsolute) { return(SLTool.ToCellRange(WorksheetName, StartRowIndex, StartColumnIndex, EndRowIndex, EndColumnIndex, IsAbsolute)); }
/// <summary> /// Get the cell range reference given a corner cell and its opposite corner cell in a cell range. For example "A1:C5". /// </summary> /// <param name="StartRowIndex">The row index of the start cell of the cell range. This is typically the top-left cell.</param> /// <param name="StartColumnIndex"> /// The column index of the start cell of the cell range. This is typically the top-left /// cell. /// </param> /// <param name="EndRowIndex">The row index of the end cell of the cell range. This is typically the bottom-right cell.</param> /// <param name="EndColumnIndex"> /// The column index of the end cell of the cell range. This is typically the bottom-right /// cell. /// </param> /// <returns>The cell range reference.</returns> public static string ToCellRange(int StartRowIndex, int StartColumnIndex, int EndRowIndex, int EndColumnIndex) { return(SLTool.ToCellRange(string.Empty, StartRowIndex, StartColumnIndex, EndRowIndex, EndColumnIndex, false)); }
/// <summary> /// Get the cell range reference given a corner cell and its opposite corner cell in a cell range. For example "A1:C5" /// or "$A$1:$C$5". /// </summary> /// <param name="StartRowIndex">The row index of the start cell of the cell range. This is typically the top-left cell.</param> /// <param name="StartColumnIndex"> /// The column index of the start cell of the cell range. This is typically the top-left /// cell. /// </param> /// <param name="EndRowIndex">The row index of the end cell of the cell range. This is typically the bottom-right cell.</param> /// <param name="EndColumnIndex"> /// The column index of the end cell of the cell range. This is typically the bottom-right /// cell. /// </param> /// <param name="IsAbsolute">True for absolute reference. False for relative reference.</param> /// <returns>The cell range reference.</returns> public static string ToCellRange(int StartRowIndex, int StartColumnIndex, int EndRowIndex, int EndColumnIndex, bool IsAbsolute) { return(SLTool.ToCellRange(string.Empty, StartRowIndex, StartColumnIndex, EndRowIndex, EndColumnIndex, IsAbsolute)); }