Module jp.ecuacion.util.poi
Class ExcelTableWriter<T>
java.lang.Object
jp.ecuacion.util.poi.excel.table.ExcelTable<T>
jp.ecuacion.util.poi.excel.table.writer.ExcelTableWriter<T>
- Type Parameters:
T- SeeIfExcelTable.
- All Implemented Interfaces:
IfExcelTable<T>,IfExcelTableWriter<T>
- Direct Known Subclasses:
CellFreeExcelTableWriter,CellOneLineHeaderExcelTableWriter
Is a parent of excel table writer classes.
-
Field Summary
Fields inherited from class jp.ecuacion.util.poi.excel.table.ExcelTable
sheetName, tableStartColumnNumber, tableStartRowNumber -
Constructor Summary
ConstructorsConstructorDescriptionExcelTableWriter(String sheetName, Integer tableStartRowNumber, int tableStartColumnNumber) Constructs a new instance with the sheet name, the position of the excel table. -
Method Summary
Methods 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.IfExcelTable
getFarLeftHeaderLabel, getSheetName, getStringValue, validateHeaderMethods inherited from interface jp.ecuacion.util.poi.excel.table.writer.IfExcelTableWriter
writeToCell
-
Constructor Details
-
ExcelTableWriter
public ExcelTableWriter(@RequireNonnull String sheetName, @Nullable Integer tableStartRowNumber, int tableStartColumnNumber) Constructs a new instance with the sheet name, the position of the excel table.- Parameters:
sheetName- SeeExcelTable.sheetName.tableStartRowNumber- SeeExcelTable.tableStartRowNumber.tableStartColumnNumber- SeeExcelTable.tableStartColumnNumber.
-
-
Method Details
-
write
public void write(String templateFilePath, String destFilePath, List<List<T>> dataList) throws Exception Writes table data to the designated excel file.- Parameters:
destFilePath- destFilePathdataList- dataList- Throws:
Exception
-
getHeaderList
protected abstract List<List<String>> getHeaderList(@RequireNonnull String templateFilePath, int tableColumnSize) throws org.apache.poi.EncryptedDocumentException, jp.ecuacion.lib.core.exception.checked.AppException, IOException Obtains header list.- Parameters:
tableColumnSize- tableColumnSize- Returns:
- the list
- Throws:
IOException- IOExceptionjp.ecuacion.lib.core.exception.checked.AppException- AppExceptionorg.apache.poi.EncryptedDocumentException- EncryptedDocumentException
-