21 private readonly
Workbook workbookReference;
29 this.workbookReference = reference;
39 workbookReference.SetCurrentWorksheet(worksheet);
40 currentWorksheet = worksheet;
47 internal void SetCurrentWorksheetInternal(
Worksheet worksheet)
49 currentWorksheet = worksheet;
57 public void Value(
object cellValue)
60 currentWorksheet.AddNextCell(cellValue);
72 currentWorksheet.AddNextCell(cellValue, style);
83 currentWorksheet.AddNextCellFormula(cellFormula);
95 currentWorksheet.AddNextCellFormula(cellFormula, style);
104 currentWorksheet.GoToNextRow();
113 public void Down(
int numberOfRows,
bool keepColumnPosition =
false)
116 currentWorksheet.GoToNextRow(numberOfRows, keepColumnPosition);
126 currentWorksheet.GoToNextRow(-1);
135 public void Up(
int numberOfRows,
bool keepColumnPosition =
false)
138 currentWorksheet.GoToNextRow(-1 * numberOfRows, keepColumnPosition);
147 currentWorksheet.GoToNextColumn();
155 public void Right(
int numberOfColumns,
bool keepRowPosition =
false)
158 currentWorksheet.GoToNextColumn(numberOfColumns, keepRowPosition);
168 currentWorksheet.GoToNextColumn(-1);
177 public void Left(
int numberOfColumns,
bool keepRowRowPosition =
false)
180 currentWorksheet.GoToNextColumn(-1 * numberOfColumns, keepRowRowPosition);
186 private void NullCheck()
188 if (currentWorksheet ==
null)
Class for exceptions regarding worksheet incidents.
void Right()
Moves the cursor one column to the right.
void Value(object cellValue)
Sets a value into the current cell and moves the cursor to the next cell (column or row depending on ...
void SetCurrentWorksheet(Worksheet worksheet)
Sets the worksheet accessed by the shortener.
void Up(int numberOfRows, bool keepColumnPosition=false)
Moves the cursor the number of defined rows up.
void Down(int numberOfRows, bool keepColumnPosition=false)
Moves the cursor the number of defined rows down.
void Left()
Moves the cursor one column to the left.
void Formula(string cellFormula)
Sets a formula into the current cell and moves the cursor to the next cell (column or row depending o...
void Up()
Moves the cursor one row up.
void Right(int numberOfColumns, bool keepRowPosition=false)
Moves the cursor the number of defined columns to the right.
void Formula(string cellFormula, Style style)
Sets a formula with style into the current cell and moves the cursor to the next cell (column or row ...
void Down()
Moves the cursor one row down.
Shortener(Workbook reference)
Constructor with workbook reference.
void Value(object cellValue, Style style)
Sets a value with style into the current cell and moves the cursor to the next cell (column or row de...
void Left(int numberOfColumns, bool keepRowRowPosition=false)
Moves the cursor the number of defined columns to the left.
Class representing a Style with sub classes within a style sheet. An instance of this class is only a...
Class representing a workbook.
Worksheet CurrentWorksheet
Gets the current worksheet.
Class representing a worksheet of a workbook.