Class ExcelWorksheet
java.lang.Object
org.eclipse.epsilon.emc.spreadsheets.SpreadsheetWorksheet
org.eclipse.epsilon.emc.spreadsheets.excel.ExcelWorksheet
-
Field Summary
Modifier and TypeFieldDescriptionprotected ExcelModel
protected org.apache.poi.ss.usermodel.Sheet
Fields inherited from class org.eclipse.epsilon.emc.spreadsheets.SpreadsheetWorksheet
alias, dataTypeStrict, existsInSpreadsheet, header, name
-
Constructor Summary
ConstructorDescriptionExcelWorksheet
(ExcelModel model, org.apache.poi.ss.usermodel.Sheet sheet, boolean existsInSpreadsheet) -
Method Summary
Modifier and TypeMethodDescriptionprotected SpreadsheetColumn
createColumn
(int index) Creates a column with the specified column indexprotected void
The purpose of this method is to create this worksheet in the spreadsheetThis method returns the default value to be written to a cell when a new empty row is created in a worksheet that is not enforcing data type strictness.int
int
getRows()
Gets all rows contained by the worksheetinsertRow
(Map<SpreadsheetColumn, String> values) Inserts a new row in the worksheet with given values in the given columns.protected void
Loads header row information - index and name - from the spreadsheet if the worksheet exists in the spreadsheetvoid
removeRow
(SpreadsheetRow row) Deletes the given row from the actual worksheet.Methods inherited from class org.eclipse.epsilon.emc.spreadsheets.SpreadsheetWorksheet
addColumn, addColumn, addRow, addRowWithValuesInColumns, addWorksheetMetadata, checkThatWorksheetExists, deleteRow, findRows, getAlias, getColumn, getColumn, getDoesNotExistInSpreadsheet, getExistsInSpreadsheet, getHeader, getModel, getName, getNonexistentWorksheetMessage, getValuesForEmptyRow, isDataTypeStrict, isIdentifiablyBy, toString
-
Field Details
-
model
-
sheet
protected org.apache.poi.ss.usermodel.Sheet sheet
-
-
Constructor Details
-
ExcelWorksheet
public ExcelWorksheet(ExcelModel model, org.apache.poi.ss.usermodel.Sheet sheet, boolean existsInSpreadsheet)
-
-
Method Details
-
createInSpreadsheet
protected void createInSpreadsheet()Description copied from class:SpreadsheetWorksheet
The purpose of this method is to create this worksheet in the spreadsheet- Specified by:
createInSpreadsheet
in classSpreadsheetWorksheet
-
loadHeader
protected void loadHeader()Description copied from class:SpreadsheetWorksheet
Loads header row information - index and name - from the spreadsheet if the worksheet exists in the spreadsheet- Specified by:
loadHeader
in classSpreadsheetWorksheet
-
createColumn
Description copied from class:SpreadsheetWorksheet
Creates a column with the specified column index- Specified by:
createColumn
in classSpreadsheetWorksheet
- Returns:
- column
-
getRows
Description copied from class:SpreadsheetWorksheet
Gets all rows contained by the worksheet- Specified by:
getRows
in classSpreadsheetWorksheet
- Returns:
- List of rows
-
insertRow
Description copied from class:SpreadsheetWorksheet
Inserts a new row in the worksheet with given values in the given columns.- Specified by:
insertRow
in classSpreadsheetWorksheet
- Returns:
- the newly created row
-
removeRow
Description copied from class:SpreadsheetWorksheet
Deletes the given row from the actual worksheet.- Specified by:
removeRow
in classSpreadsheetWorksheet
-
getDefaultEmptyCellValue
Description copied from class:SpreadsheetWorksheet
This method returns the default value to be written to a cell when a new empty row is created in a worksheet that is not enforcing data type strictness.- Specified by:
getDefaultEmptyCellValue
in classSpreadsheetWorksheet
- Returns:
- String
-
getHeaderRowIndex
public int getHeaderRowIndex() -
getFirstRowIndex
public int getFirstRowIndex()
-