/ClosedXML/ClosedXML/ClosedXML/Excel/Ranges/IXLRangeColumn.cs

# · C# · 110 lines · 41 code · 18 blank · 51 comment · 0 complexity · 7232587ce1a363a3f8d2c5729444d51f MD5 · raw file

  1. using System;
  2. namespace ClosedXML.Excel
  3. {
  4. public interface IXLRangeColumn : IXLRangeBase
  5. {
  6. /// <summary>
  7. /// Gets the cell in the specified row.
  8. /// </summary>
  9. /// <param name="rowNumber">The cell's row.</param>
  10. IXLCell Cell(Int32 rowNumber);
  11. /// <summary>
  12. /// Returns the specified group of cells, separated by commas.
  13. /// <para>e.g. Cells("1"), Cells("1:5"), Cells("1:2,4:5")</para>
  14. /// </summary>
  15. /// <param name="cellsInColumn">The column cells to return.</param>
  16. new IXLCells Cells(String cellsInColumn);
  17. /// <summary>
  18. /// Returns the specified group of cells.
  19. /// </summary>
  20. /// <param name="firstRow">The first row in the group of cells to return.</param>
  21. /// <param name="lastRow">The last row in the group of cells to return.</param>
  22. IXLCells Cells(Int32 firstRow, Int32 lastRow);
  23. /// <summary>
  24. /// Inserts X number of columns to the right of this range.
  25. /// <para>All cells to the right of this range will be shifted X number of columns.</para>
  26. /// </summary>
  27. /// <param name="numberOfColumns">Number of columns to insert.</param>
  28. IXLRangeColumns InsertColumnsAfter(int numberOfColumns);
  29. IXLRangeColumns InsertColumnsAfter(int numberOfColumns, Boolean expandRange);
  30. /// <summary>
  31. /// Inserts X number of columns to the left of this range.
  32. /// <para>This range and all cells to the right of this range will be shifted X number of columns.</para>
  33. /// </summary>
  34. /// <param name="numberOfColumns">Number of columns to insert.</param>
  35. IXLRangeColumns InsertColumnsBefore(int numberOfColumns);
  36. IXLRangeColumns InsertColumnsBefore(int numberOfColumns, Boolean expandRange);
  37. /// <summary>
  38. /// Inserts X number of cells on top of this column.
  39. /// <para>This column and all cells below it will be shifted X number of rows.</para>
  40. /// </summary>
  41. /// <param name="numberOfRows">Number of cells to insert.</param>
  42. IXLCells InsertCellsAbove(int numberOfRows);
  43. IXLCells InsertCellsAbove(int numberOfRows, Boolean expandRange);
  44. /// <summary>
  45. /// Inserts X number of cells below this range.
  46. /// <para>All cells below this column will be shifted X number of rows.</para>
  47. /// </summary>
  48. /// <param name="numberOfRows">Number of cells to insert.</param>
  49. IXLCells InsertCellsBelow(int numberOfRows);
  50. IXLCells InsertCellsBelow(int numberOfRows, Boolean expandRange);
  51. /// <summary>
  52. /// Deletes this range and shifts the cells at the right.
  53. /// </summary>
  54. void Delete();
  55. /// <summary>
  56. /// Deletes this range and shifts the surrounding cells accordingly.
  57. /// </summary>
  58. /// <param name="shiftDeleteCells">How to shift the surrounding cells.</param>
  59. void Delete(XLShiftDeletedCells shiftDeleteCells);
  60. /// <summary>
  61. /// Gets this column's number in the range
  62. /// </summary>
  63. Int32 ColumnNumber();
  64. /// <summary>
  65. /// Gets this column's letter in the range
  66. /// </summary>
  67. String ColumnLetter();
  68. Int32 CellCount();
  69. IXLRangeColumn CopyTo(IXLCell target);
  70. IXLRangeColumn CopyTo(IXLRangeBase target);
  71. IXLRangeColumn Sort(XLSortOrder sortOrder = XLSortOrder.Ascending, Boolean matchCase = false, Boolean ignoreBlanks = true);
  72. IXLRangeColumn Column(Int32 start, Int32 end);
  73. IXLRangeColumn Column(IXLCell start, IXLCell end);
  74. IXLRangeColumns Columns(String columns);
  75. IXLRangeColumn SetDataType(XLCellValues dataType);
  76. IXLRangeColumn ColumnLeft();
  77. IXLRangeColumn ColumnLeft(Int32 step);
  78. IXLRangeColumn ColumnRight();
  79. IXLRangeColumn ColumnRight(Int32 step);
  80. IXLColumn WorksheetColumn();
  81. IXLTable AsTable();
  82. IXLTable AsTable(String name);
  83. IXLTable CreateTable();
  84. IXLTable CreateTable(String name);
  85. /// <summary>
  86. /// Clears the contents of this column.
  87. /// </summary>
  88. /// <param name="clearOptions">Specify what you want to clear.</param>
  89. new IXLRangeColumn Clear(XLClearOptions clearOptions = XLClearOptions.ContentsAndFormats);
  90. IXLRangeColumn ColumnUsed(Boolean includeFormats = false);
  91. }
  92. }