|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jet.bean.ExcelParameter
public class ExcelParameter
The ExcelParameter
class is used for exporting to Excel. It contains all the
information for exporting report results.
To create an ExcelParameter
using the constructors in this class:
ExcelParameter()Then you can set the value of parameters as you want.
There are four types of report layouts when exporting reports to Excel. They are:
1."Preserve Report Formatting": You must use the method setNewExcelLayout(true). This method calls setBiff8(false) regardless of the previous setting. 2.Normal Formatting: This type is from v7 and sometimes works better for analysis even though the look of the report is not maintained. If you want to use this type, you must use setNewExcelLayout(false) and setBiff8(false). 3.Excel 2000: You must use the method setBiff8(true). This method calls setNewExcelLayout(false) regardless of the previous setting. 4.Columned Type: If you want to use the columned type, you must set "Columned" to true in report template and then use Normal Formatting when exporting reports to Excel file.
- See Also:
- Serialized Form
Field Summary static java.lang.String
EXP
The suffix file name of the XLS Excel file.static int
EXPORTSHAPE
Useful constant for exporting shapes.static int
KEEPORIGIN
Useful constant for word wrap.static int
NOEXPORTSHAPE
Useful constant for exporting shapes.static int
NOWORDWRAP
Useful constant for word wrap.static int
WORDWRAPALL
Useful constant for word wrap.static int
XLSFORMAT
Specifies the Excel result as XLS format.static java.lang.String
XLSXEXP
The suffix file name of the XLSX format Excel file.static int
XLSXFORMAT
Specifies the Excel result as XLSX format.
Constructor Summary ExcelParameter()
Initializes a newly createdExcelParameter
object so that it can hold the values used in exporting to the Excel file.
Method Summary ExcelParameter
copy()
Adding the method for MailInformation can clone this object.java.lang.String
getPrintPageFooter()
Gets the print page footer.java.lang.String
getPrintPageHeader()
Gets the print page header.int
getWordWrapType()
Gets the word wrap type in the parameter.boolean
isBiff8()
Gets the boolean value of whether to check the "Excel 2000" option.boolean
isExportShape()
Gets the boolean value of whether to export shapes.boolean
isNewExcelLayout()
Gets the boolean value of whether to check the "Preserve Report Formatting" option.boolean
isPrintGridlines()
Gets the flag that indexes whether to print gridlines or not.boolean
isShareLabel()
Gets the boolean value of whether to set ShareLabel.boolean
isXlsFormat()
Gets the flag which specifies whether the Excel result is XLS or not.void
setBiff8(boolean biff8)
Sets the "Excel 2000" option.void
setFileFormat(int format)
Sets the Excel result format.void
setNewExcelLayout(boolean isNewExcelLayout)
Sets the value of whether to check the "Preserve Report Formatting" option.void
setParam(int param)
Sets whether to export shapes.void
setPrintGridlinesAble(boolean isPrint)
Sets the flag that indexes whether to print gridlines or not.void
setPrintPageHeaderAndFooter(java.lang.String header, java.lang.String footer)
Sets the value of Print page header and footer in Excel file.void
setShareLable(boolean shareLabel)
Deprecated. This method is not used, we export the Excel file as share format.void
setWordWrapType(int wordWrapType)
Sets the word wrap type.
Methods inherited from class java.lang.Object equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Field Detail KEEPORIGIN
public static final int KEEPORIGIN
- Useful constant for word wrap. Keeps all the cell original word wrap settings in the Excel file.
- See Also:
- Constant Field Values
NOWORDWRAP
public static final int NOWORDWRAP
- Useful constant for word wrap. Ignores all the cell word wrap settings in the Excel file.
- See Also:
- Constant Field Values
WORDWRAPALL
public static final int WORDWRAPALL
- Useful constant for word wrap. Sets word wrap on for all the cells in the Excel file.
- See Also:
- Constant Field Values
EXPORTSHAPE
public static final int EXPORTSHAPE
- Useful constant for exporting shapes. Exports all shapes to the Excel file.
- See Also:
- Constant Field Values
NOEXPORTSHAPE
public static final int NOEXPORTSHAPE
- Useful constant for exporting shapes. Does not export any shapes to the Excel file.
- See Also:
- Constant Field Values
EXP
public static final java.lang.String EXP
- The suffix file name of the XLS Excel file.
- See Also:
- Constant Field Values
XLSXEXP
public static final java.lang.String XLSXEXP
- The suffix file name of the XLSX format Excel file.
- See Also:
- Constant Field Values
XLSFORMAT
public static final int XLSFORMAT
- Specifies the Excel result as XLS format.
- See Also:
- Constant Field Values
XLSXFORMAT
public static final int XLSXFORMAT
- Specifies the Excel result as XLSX format.
- See Also:
- Constant Field Values
Constructor Detail ExcelParameter
public ExcelParameter()
- Initializes a newly created
ExcelParameter
object so that it can hold the values used in exporting to the Excel file. Note that this constructor is empty. Every value is a default value.
Method Detail setPrintPageHeaderAndFooter
public void setPrintPageHeaderAndFooter(java.lang.String header, java.lang.String footer)
- Sets the value of Print page header and footer in Excel file.
- Parameters:
header
- The Print page header in Excel file.footer
- The Print page footer in Excel file.
getPrintPageHeader
public java.lang.String getPrintPageHeader()
- Gets the print page header.
- Returns:
- The Print page header of Excel parameter.
getPrintPageFooter
public java.lang.String getPrintPageFooter()
- Gets the print page footer.
- Returns:
- The Print page footer of Excel parameter.
setPrintGridlinesAble
public void setPrintGridlinesAble(boolean isPrint)
- Sets the flag that indexes whether to print gridlines or not.
- Parameters:
isPrint
- Prints the gridlines when it is true.
isPrintGridlines
public boolean isPrintGridlines()
- Gets the flag that indexes whether to print gridlines or not.
- Returns:
- true when printing gridlines
setWordWrapType
public void setWordWrapType(int wordWrapType)
- Sets the word wrap type. There are three types of word wrap.
KEEPORIGIN NOWORDWRAP WORDWRAPALL
- Parameters:
wordWrapType
-
setParam
public void setParam(int param)
- Sets whether to export shapes. If you want to export shapes, you must select the "Default type" or "Preserve Report Formatting" option, as Excel 2000 does not support shapes.
- Parameters:
param
- When param is 1, export shapes to Excel. Any other value ignore shapes.
setShareLable
public void setShareLable(boolean shareLabel)
- Deprecated. This method is not used, we export the Excel file as share format.
- Sets whether to use share label.
- Parameters:
shareLabel
- the boolean value share value.
setNewExcelLayout
public void setNewExcelLayout(boolean isNewExcelLayout)
- Sets the value of whether to check the "Preserve Report Formatting" option. If it is true, isBiff8 will be set to false.
- Parameters:
isNewExcelLayout
- the boolean value that represents the option.
getWordWrapType
public int getWordWrapType()
- Gets the word wrap type in the parameter.
- Returns:
- The word wrap type.
isExportShape
public boolean isExportShape()
- Gets the boolean value of whether to export shapes.
- Returns:
- The boolean value of export shapes.
isShareLabel
public boolean isShareLabel()
- Gets the boolean value of whether to set ShareLabel.
- Returns:
- The boolean value of setting share label.
isNewExcelLayout
public boolean isNewExcelLayout()
- Gets the boolean value of whether to check the "Preserve Report Formatting" option.
- Returns:
- The boolean value of whether to check the "Preserve Report Formatting" option.
isBiff8
public boolean isBiff8()
- Gets the boolean value of whether to check the "Excel 2000" option.
- Returns:
- The boolean value of whether to check the "Excel 2000" option.
setBiff8
public void setBiff8(boolean biff8)
- Sets the "Excel 2000" option. If it is true, then option "Preserve Report Formatting" will be set to false.
- Parameters:
biff8
-
setFileFormat
public void setFileFormat(int format)
- Sets the Excel result format.
- Parameters:
format
- it should beXLSFORMAT
orXLSXFORMAT
for now.
isXlsFormat
public boolean isXlsFormat()
- Gets the flag which specifies whether the Excel result is XLS or not.
- Returns:
- true if it is XLS format, otherwise, false.
copy
public ExcelParameter copy()
- Adding the method for MailInformation can clone this object.
- Returns:
Overview Package Class Tree Deprecated Index Help PREV CLASS NEXT CLASS FRAMES NO FRAMES SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD