@NotThreadSafe public class ExporterExcel extends Object implements IExporterFile
| Modifier and Type | Field and Description |
|---|---|
static boolean |
DEFAULT_AUTOSIZE_ALL_COLUMNS |
| Constructor and Description |
|---|
ExporterExcel(com.helger.poi.excel.EExcelVersion eVersion) |
| Modifier and Type | Method and Description |
|---|---|
com.helger.commons.state.ESuccess |
exportRecords(IExportRecordProvider aProvider,
OutputStream aOS)
Export all provided records to an output stream.
|
com.helger.poi.excel.EExcelVersion |
getExcelVersion() |
EExchangeFileType |
getFileType() |
com.helger.poi.excel.style.ExcelStyle |
getStyleBoolean() |
com.helger.poi.excel.style.ExcelStyle |
getStyleDate() |
com.helger.poi.excel.style.ExcelStyle |
getStyleDateTime() |
com.helger.poi.excel.style.ExcelStyle |
getStyleDouble() |
com.helger.poi.excel.style.ExcelStyle |
getStyleInt() |
com.helger.poi.excel.style.ExcelStyle |
getStyleText() |
com.helger.poi.excel.style.ExcelStyle |
getStyleTime() |
boolean |
isAutoSizeAllColumns() |
protected void |
onAddCell(com.helger.poi.excel.WorkbookCreationHelper aWBCH,
EExportRecordType eRecordType,
org.apache.poi.ss.usermodel.Cell aCell,
int nCellIndex,
EExportDataType eBaseType)
Callback when a new row is created.
|
protected void |
onAddRow(com.helger.poi.excel.WorkbookCreationHelper aWBCH,
EExportRecordType eRecordType,
org.apache.poi.ss.usermodel.Row aRow,
int nRowIndex)
Callback when a new row is created.
|
ExporterExcel |
setAutoSizeAllColumns(boolean bAutoSizeAllColumns) |
ExporterExcel |
setStyleBoolean(com.helger.poi.excel.style.ExcelStyle aStyle) |
ExporterExcel |
setStyleDate(com.helger.poi.excel.style.ExcelStyle aStyle) |
ExporterExcel |
setStyleDateTime(com.helger.poi.excel.style.ExcelStyle aStyle) |
ExporterExcel |
setStyleDouble(com.helger.poi.excel.style.ExcelStyle aStyle) |
ExporterExcel |
setStyleInt(com.helger.poi.excel.style.ExcelStyle aStyle) |
ExporterExcel |
setStyleText(com.helger.poi.excel.style.ExcelStyle aStyle) |
ExporterExcel |
setStyleTime(com.helger.poi.excel.style.ExcelStyle aStyle) |
public static final boolean DEFAULT_AUTOSIZE_ALL_COLUMNS
public ExporterExcel(@Nonnull com.helger.poi.excel.EExcelVersion eVersion)
@Nonnull public final EExchangeFileType getFileType()
getFileType in interface IExporterFile@Nonnull public final com.helger.poi.excel.EExcelVersion getExcelVersion()
@Nullable @ReturnsMutableCopy public final com.helger.poi.excel.style.ExcelStyle getStyleBoolean()
@Nonnull public final ExporterExcel setStyleBoolean(@Nullable com.helger.poi.excel.style.ExcelStyle aStyle)
@Nullable @ReturnsMutableCopy public final com.helger.poi.excel.style.ExcelStyle getStyleInt()
@Nonnull public final ExporterExcel setStyleInt(@Nullable com.helger.poi.excel.style.ExcelStyle aStyle)
@Nullable @ReturnsMutableCopy public final com.helger.poi.excel.style.ExcelStyle getStyleDouble()
@Nonnull public final ExporterExcel setStyleDouble(@Nullable com.helger.poi.excel.style.ExcelStyle aStyle)
@Nullable @ReturnsMutableCopy public final com.helger.poi.excel.style.ExcelStyle getStyleText()
@Nonnull public final ExporterExcel setStyleText(@Nullable com.helger.poi.excel.style.ExcelStyle aStyle)
@Nonnull @ReturnsMutableCopy public final com.helger.poi.excel.style.ExcelStyle getStyleDate()
@Nonnull public final ExporterExcel setStyleDate(@Nonnull com.helger.poi.excel.style.ExcelStyle aStyle)
@Nonnull @ReturnsMutableCopy public final com.helger.poi.excel.style.ExcelStyle getStyleTime()
@Nonnull public final ExporterExcel setStyleTime(@Nonnull com.helger.poi.excel.style.ExcelStyle aStyle)
@Nonnull @ReturnsMutableCopy public final com.helger.poi.excel.style.ExcelStyle getStyleDateTime()
@Nonnull public final ExporterExcel setStyleDateTime(@Nonnull com.helger.poi.excel.style.ExcelStyle aStyle)
public final boolean isAutoSizeAllColumns()
@Nonnull public final ExporterExcel setAutoSizeAllColumns(boolean bAutoSizeAllColumns)
@OverrideOnDemand protected void onAddRow(@Nonnull com.helger.poi.excel.WorkbookCreationHelper aWBCH, @Nonnull EExportRecordType eRecordType, @Nonnull org.apache.poi.ss.usermodel.Row aRow, @Nonnegative int nRowIndex)
aWBCH - The creation helpereRecordType - The record typeaRow - The created row.nRowIndex - The 0-based total index of the row (including header)@OverrideOnDemand protected void onAddCell(@Nonnull com.helger.poi.excel.WorkbookCreationHelper aWBCH, @Nonnull EExportRecordType eRecordType, @Nonnull org.apache.poi.ss.usermodel.Cell aCell, @Nonnegative int nCellIndex, @Nonnull EExportDataType eBaseType)
aWBCH - The creation helpereRecordType - The record typeaCell - The created cell.nCellIndex - The 0-based index of the cell in the current roweBaseType - The data type of the last cells data.@Nonnull public final com.helger.commons.state.ESuccess exportRecords(@Nonnull IExportRecordProvider aProvider, @Nonnull @WillClose OutputStream aOS)
IExporterexportRecords in interface IExporteraProvider - The provider for all records. May not be null.aOS - The output stream to write to. Will be closed automatically in any
case. May not be null.ESuccess.SUCCESS if at lease one record was provided and
saving was successful.Copyright © 2014–2021 Philip Helger. All rights reserved.