public class WriteContextImpl extends Object implements WriteContext
| Constructor and Description |
|---|
WriteContextImpl(WriteWorkbook writeWorkbook)
Constructor to initialize the WriteContextImpl with a WriteWorkbook.
|
| Modifier and Type | Method and Description |
|---|---|
void |
currentSheet(WriteSheet writeSheet,
WriteTypeEnum writeType)
Sets the current sheet for writing.
|
void |
currentTable(WriteTable writeTable)
Sets the current table for writing.
|
WriteHolder |
currentWriteHolder()
Retrieves the current write holder.
|
void |
finish(boolean onException)
Finishes the write process and releases resources.
|
org.apache.poi.ss.usermodel.Sheet |
getCurrentSheet()
Retrieves the current sheet being written.
|
OutputStream |
getOutputStream()
Retrieves the output stream for writing the Excel file.
|
org.apache.poi.ss.usermodel.Workbook |
getWorkbook()
Retrieves the workbook being written.
|
void |
initHead(ExcelWriteHeadProperty excelWriteHeadProperty)
Initializes the header for the current sheet or table.
|
boolean |
needHead()
Checks if the current sheet requires a header.
|
WriteSheetHolder |
writeSheetHolder()
Retrieves the current sheet holder.
|
WriteTableHolder |
writeTableHolder()
Retrieves the current table holder.
|
WriteWorkbookHolder |
writeWorkbookHolder()
Retrieves the current workbook holder.
|
public WriteContextImpl(WriteWorkbook writeWorkbook)
writeWorkbook - The workbook configuration for writing.public void currentSheet(WriteSheet writeSheet, WriteTypeEnum writeType)
currentSheet in interface WriteContextwriteSheet - The sheet configuration for writing.writeType - The type of write operation.public void initHead(ExcelWriteHeadProperty excelWriteHeadProperty)
excelWriteHeadProperty - The header property for writing.public void currentTable(WriteTable writeTable)
currentTable in interface WriteContextwriteTable - The table configuration for writing.public WriteWorkbookHolder writeWorkbookHolder()
writeWorkbookHolder in interface WriteContextpublic WriteSheetHolder writeSheetHolder()
writeSheetHolder in interface WriteContextpublic WriteTableHolder writeTableHolder()
writeTableHolder in interface WriteContextpublic WriteHolder currentWriteHolder()
currentWriteHolder in interface WriteContextpublic void finish(boolean onException)
finish in interface WriteContextonException - Indicates whether the finish is triggered by an exception.public org.apache.poi.ss.usermodel.Sheet getCurrentSheet()
getCurrentSheet in interface WriteContextpublic boolean needHead()
needHead in interface WriteContextpublic OutputStream getOutputStream()
getOutputStream in interface WriteContextpublic org.apache.poi.ss.usermodel.Workbook getWorkbook()
getWorkbook in interface WriteContextCopyright © 2024–2025 fast-excel. All rights reserved.