Module jp.ecuacion.util.poi
Class CellOneLineHeaderExcelTableWriter
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.CellOneLineHeaderExcelTableWriter
- All Implemented Interfaces:
IfDataTypeCellExcelTable,IfExcelTable<org.apache.poi.ss.usermodel.Cell>,IfFormatOneLineHeaderExcelTable<org.apache.poi.ss.usermodel.Cell>,IfDataTypeCellExcelTableWriter,IfExcelTableWriter<org.apache.poi.ss.usermodel.Cell>
public class CellOneLineHeaderExcelTableWriter
extends ExcelTableWriter<org.apache.poi.ss.usermodel.Cell>
implements IfDataTypeCellExcelTableWriter, IfFormatOneLineHeaderExcelTable<org.apache.poi.ss.usermodel.Cell>
Reads tables with known number of columns, one line header labels if it has a header line.
-
Field Summary
Fields inherited from class jp.ecuacion.util.poi.excel.table.ExcelTable
sheetName, tableStartColumnNumber, tableStartRowNumber -
Constructor Summary
ConstructorsConstructorDescriptionCellOneLineHeaderExcelTableWriter(String sheetName, String[] headerLabels, Integer tableStartRowNumber, int tableStartColumnNumber) Constructs a new instance. -
Method Summary
Modifier and TypeMethodDescriptiongetHeaderData(String templateFilePath, int tableColumnSize) Obtains header list from the file attemplateFilePath.String[]Defines the header labels in the excel table.Methods inherited from class jp.ecuacion.util.poi.excel.table.writer.ExcelTableWriter
writeMethods inherited from class jp.ecuacion.util.poi.excel.table.ExcelTable
getPoiBasisDeterminedTableStartColumnNumber, getPoiBasisDeterminedTableStartRowNumber, getSheetNameMethods 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.IfDataTypeCellExcelTable
getStringValueMethods inherited from interface jp.ecuacion.util.poi.excel.table.writer.IfDataTypeCellExcelTableWriter
writeToCellMethods inherited from interface jp.ecuacion.util.poi.excel.table.IfExcelTable
getSheetName, validateHeaderDataMethods inherited from interface jp.ecuacion.util.poi.excel.table.IfFormatOneLineHeaderExcelTable
getFarLeftAndTopHeaderLabel, getHeaderLabelData, validateHeader
-
Constructor Details
-
CellOneLineHeaderExcelTableWriter
public CellOneLineHeaderExcelTableWriter(@RequireNonnull String sheetName, @RequireNonnull String[] headerLabels, @Nullable Integer tableStartRowNumber, int tableStartColumnNumber) Constructs a new instance.- Parameters:
sheetName- SeeExcelTable.sheetName.tableStartRowNumber- SeeExcelTable.tableStartRowNumber.tableStartColumnNumber- SeeExcelTable.tableStartColumnNumber.
-
-
Method Details
-
getHeaderLabels
Description copied from interface:IfFormatOneLineHeaderExcelTableDefines the header labels in the excel table.It can be like
new String[] {"first name", "last name", "age"}.- Specified by:
getHeaderLabelsin interfaceIfFormatOneLineHeaderExcelTable<org.apache.poi.ss.usermodel.Cell>
-
getHeaderData
protected List<List<String>> getHeaderData(@Nullable String templateFilePath, int tableColumnSize) 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:
getHeaderDatain classExcelTableWriter<org.apache.poi.ss.usermodel.Cell>- Parameters:
templateFilePath- nullable when the data is written to a new excel file.tableColumnSize- tableColumnSize- Returns:
- the list of
String, may be an empty list whentemplateFilePathisnull. - Throws:
org.apache.poi.EncryptedDocumentException- EncryptedDocumentExceptionjp.ecuacion.lib.core.exception.checked.AppException- AppExceptionIOException- IOException
-