Class ExcelWorksheet
java.lang.Object
org.eclipse.epsilon.emc.spreadsheets.SpreadsheetWorksheet
org.eclipse.epsilon.emc.spreadsheets.excel.ExcelWorksheet
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ExcelModelprotected org.apache.poi.ss.usermodel.SheetFields inherited from class org.eclipse.epsilon.emc.spreadsheets.SpreadsheetWorksheet
alias, dataTypeStrict, existsInSpreadsheet, header, name -
Constructor Summary
ConstructorsConstructorDescriptionExcelWorksheet(ExcelModel model, org.apache.poi.ss.usermodel.Sheet sheet, boolean existsInSpreadsheet) -
Method Summary
Modifier and TypeMethodDescriptionprotected SpreadsheetColumncreateColumn(int index) Creates a column with the specified column indexprotected voidThe 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.intintgetRows()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 voidLoads header row information - index and name - from the spreadsheet if the worksheet exists in the spreadsheetvoidremoveRow(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:SpreadsheetWorksheetThe purpose of this method is to create this worksheet in the spreadsheet- Specified by:
createInSpreadsheetin classSpreadsheetWorksheet
-
loadHeader
protected void loadHeader()Description copied from class:SpreadsheetWorksheetLoads header row information - index and name - from the spreadsheet if the worksheet exists in the spreadsheet- Specified by:
loadHeaderin classSpreadsheetWorksheet
-
createColumn
Description copied from class:SpreadsheetWorksheetCreates a column with the specified column index- Specified by:
createColumnin classSpreadsheetWorksheet- Returns:
- column
-
getRows
Description copied from class:SpreadsheetWorksheetGets all rows contained by the worksheet- Specified by:
getRowsin classSpreadsheetWorksheet- Returns:
- List of rows
-
insertRow
Description copied from class:SpreadsheetWorksheetInserts a new row in the worksheet with given values in the given columns.- Specified by:
insertRowin classSpreadsheetWorksheet- Returns:
- the newly created row
-
removeRow
Description copied from class:SpreadsheetWorksheetDeletes the given row from the actual worksheet.- Specified by:
removeRowin classSpreadsheetWorksheet
-
getDefaultEmptyCellValue
Description copied from class:SpreadsheetWorksheetThis 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:
getDefaultEmptyCellValuein classSpreadsheetWorksheet- Returns:
- String
-
getHeaderRowIndex
public int getHeaderRowIndex() -
getFirstRowIndex
public int getFirstRowIndex()
-