Module jp.ecuacion.util.poi
Class CellFreeExcelTableWriter
java.lang.Object
jp.ecuacion.util.poi.excel.table.ExcelTable<org.apache.poi.ss.usermodel.Cell>
jp.ecuacion.util.poi.excel.table.writer.ExcelTableWriter<org.apache.poi.ss.usermodel.Cell>
jp.ecuacion.util.poi.excel.table.writer.concrete.CellFreeExcelTableWriter
- All Implemented Interfaces:
IfDataTypeCellExcelTable,IfExcelTable<org.apache.poi.ss.usermodel.Cell>,IfFormatFreeExcelTable<org.apache.poi.ss.usermodel.Cell>,IfDataTypeCellExcelTableWriter,IfExcelTableWriter<org.apache.poi.ss.usermodel.Cell>
public class CellFreeExcelTableWriter
extends ExcelTableWriter<org.apache.poi.ss.usermodel.Cell>
implements IfFormatFreeExcelTable<org.apache.poi.ss.usermodel.Cell>, IfDataTypeCellExcelTableWriter
Reads tables with unknown number of columns, unknown whether it have a header line,
unknown header labels if it has a header line.
It obtains cell values as Cell object.
The header line is not necessary.
This class reads the table at the designated position and designated lines and columns.
Finish reading if all the columns are empty in one line.
-
Nested Class Summary
Nested classes/interfaces inherited from class jp.ecuacion.util.poi.excel.table.writer.ExcelTableWriter
ExcelTableWriter.IterableWriter<T>Nested classes/interfaces inherited from class jp.ecuacion.util.poi.excel.table.ExcelTable
ExcelTable.ContextContainer -
Field Summary
Fields inherited from class jp.ecuacion.util.poi.excel.table.ExcelTable
ignoresAdditionalColumnsOfHeaderData, isVerticalAndHorizontalOpposite, sheetName, tableStartColumnNumber, tableStartRowNumber -
Constructor Summary
ConstructorsConstructorDescriptionCellFreeExcelTableWriter(String sheetName, Integer tableStartRowNumber, int tableStartColumnNumber) Constructs a new instance. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns copiesDataFormatOnly value.copiesDataFormatOnly(boolean copiesDataFormatOnly) Sets copiesDataFormatOnly value.GetscolumnStyleMapto reuseCellStyle.getStringValue(org.apache.poi.ss.usermodel.Cell cellData) Is used to get the header label string from the argument cell data.protected voidheaderCheck(org.apache.poi.ss.usermodel.Workbook workbook) Obtains header list from the file attemplateFilePath.Methods inherited from class jp.ecuacion.util.poi.excel.table.writer.ExcelTableWriter
getIterable, ignoresAdditionalColumnsOfHeaderData, isVerticalAndHorizontalOpposite, write, write, writeMethods inherited from class jp.ecuacion.util.poi.excel.table.ExcelTable
getPoiBasisDeterminedTableStartColumnNumber, getPoiBasisDeterminedTableStartRowNumber, getSheetName, ignoresAdditionalColumnsOfHeaderData, isVerticalAndHorizontalOppositeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface jp.ecuacion.util.poi.excel.table.writer.IfDataTypeCellExcelTableWriter
writeToCellMethods inherited from interface jp.ecuacion.util.poi.excel.table.IfExcelTable
getSheetName, ignoresAdditionalColumnsOfHeaderData, ignoresAdditionalColumnsOfHeaderData, isVerticalAndHorizontalOpposite, isVerticalAndHorizontalOppositeMethods inherited from interface jp.ecuacion.util.poi.excel.table.IfFormatFreeExcelTable
getFarLeftAndTopHeaderLabel, getHeaderLabelData, getNumberOfHeaderLines
-
Constructor Details
-
CellFreeExcelTableWriter
public CellFreeExcelTableWriter(@RequireNonnull String sheetName, Integer tableStartRowNumber, int tableStartColumnNumber) Constructs a new instance.- Parameters:
sheetName- SeeExcelTable.sheetName.tableStartRowNumber- SeeExcelTable.tableStartRowNumber.tableStartColumnNumber- SeeExcelTable.tableStartColumnNumber.
-
-
Method Details
-
getStringValue
public String getStringValue(@Nullable org.apache.poi.ss.usermodel.Cell cellData) throws jp.ecuacion.util.poi.excel.exception.ExcelAppException Description copied from interface:IfExcelTableIs used to get the header label string from the argument cell data.- Specified by:
getStringValuein interfaceIfDataTypeCellExcelTable- Specified by:
getStringValuein interfaceIfExcelTable<org.apache.poi.ss.usermodel.Cell>- Parameters:
cellData- data obtained from the cell- Returns:
Stringvalue obtained from thecellData- Throws:
jp.ecuacion.util.poi.excel.exception.ExcelAppException- ExcelAppException
-
headerCheck
protected void headerCheck(@RequireNonnull org.apache.poi.ss.usermodel.Workbook workbook) throws org.apache.poi.EncryptedDocumentException, jp.ecuacion.lib.core.exception.checked.AppException, IOException Description copied from class:ExcelTableWriterObtains header list from the file attemplateFilePath.- Specified by:
headerCheckin classExcelTableWriter<org.apache.poi.ss.usermodel.Cell>- Parameters:
workbook- workbook.- Throws:
org.apache.poi.EncryptedDocumentException- EncryptedDocumentExceptionjp.ecuacion.lib.core.exception.checked.AppException- AppExceptionIOException- IOException
-
getColumnStyleMap
Description copied from interface:IfDataTypeCellExcelTableWriterGetscolumnStyleMapto reuseCellStyle.- Specified by:
getColumnStyleMapin interfaceIfDataTypeCellExcelTableWriter- Returns:
- columnStyleMap
-
copiesDataFormatOnly
Description copied from interface:IfDataTypeCellExcelTableWriterSets copiesDataFormatOnly value.When this is
true, whole style is not copied to the destination cell, butDataFormatonly.
This means grid-line, font, font-size, cell color, etc... of the cell is not copied.- Specified by:
copiesDataFormatOnlyin interfaceIfDataTypeCellExcelTableWriter- Parameters:
copiesDataFormatOnly- boolean
-
copiesDataFormatOnly
public boolean copiesDataFormatOnly()Description copied from interface:IfDataTypeCellExcelTableWriterReturns copiesDataFormatOnly value.When this is
true, whole style is not copied to the destination cell, butDataFormatonly.
This means grid-line, font, font-size, cell color, etc... of the cell is not copied.- Specified by:
copiesDataFormatOnlyin interfaceIfDataTypeCellExcelTableWriter- Returns:
- boolean
-