public class JRXlsxExporter extends JRXlsAbstractExporter<XlsxReportConfiguration,XlsxExporterConfiguration,JRXlsxExporterContext>
JRXlsAbstractExporter,
XlsExporterConfiguration,
XlsReportConfiguration| Modifier and Type | Class and Description |
|---|---|
protected class |
JRXlsxExporter.ExporterContext |
JRXlsAbstractExporter.SheetInfo, JRXlsAbstractExporter.TextAlignHolderJRAbstractExporter.BaseExporterContext, JRAbstractExporter.PageRangeautoFilterEnd, autoFilterStart, DEFAULT_SHEET_NAME_PREFIX, defaultFont, EXCEPTION_MESSAGE_KEY_CANNOT_ADD_CELL, EXCEPTION_MESSAGE_KEY_CANNOT_MERGE_CELLS, EXCEPTION_MESSAGE_KEY_CELL_FORMAT_TEMPLATE_ERROR, EXCEPTION_MESSAGE_KEY_COLUMN_INDEX_BEYOND_LIMIT, EXCEPTION_MESSAGE_KEY_LOADED_FONTS_ERROR, EXCEPTION_MESSAGE_KEY_NEGATIVE_COLUMN_INDEX, EXCEPTION_MESSAGE_KEY_REPORT_GENERATION_ERROR, EXCEPTION_MESSAGE_KEY_TEMPLATE_NOT_FOUND, firstPageNotSet, invalidCharReplacement, keepTemplateSheets, loadedFonts, maxColumnIndex, nature, onePagePerSheetMap, pageFormat, pageIndex, PROPERTY_AUTO_FILTER, PROPERTY_AUTO_FIT_COLUMN, PROPERTY_AUTO_FIT_ROW, PROPERTY_BREAK_AFTER_ROW, PROPERTY_BREAK_BEFORE_ROW, PROPERTY_CELL_FORMULA, PROPERTY_CELL_HIDDEN, PROPERTY_CELL_LOCKED, PROPERTY_CELL_PATTERN, PROPERTY_COLUMN_WIDTH, PROPERTY_COLUMN_WIDTH_RATIO, PROPERTY_FIRST_PAGE_NUMBER, PROPERTY_FIT_HEIGHT, PROPERTY_FIT_WIDTH, PROPERTY_FREEZE_COLUMN, PROPERTY_FREEZE_COLUMN_EDGE, PROPERTY_FREEZE_ROW, PROPERTY_FREEZE_ROW_EDGE, PROPERTY_IGNORE_ANCHORS, PROPERTY_IGNORE_HYPERLINK, PROPERTY_IMAGE_ANCHOR_TYPE, PROPERTY_PAGE_SCALE, PROPERTY_ROW_OUTLINE_LEVEL_PREFIX, PROPERTY_SHEET_DIRECTION, PROPERTY_SHEET_FOOTER_CENTER, PROPERTY_SHEET_FOOTER_LEFT, PROPERTY_SHEET_FOOTER_RIGHT, PROPERTY_SHEET_HEADER_CENTER, PROPERTY_SHEET_HEADER_LEFT, PROPERTY_SHEET_HEADER_RIGHT, PROPERTY_SHEET_NAME, PROPERTY_SHOW_GRIDLINES, PROPERTY_USE_TIMEZONE, PROPERTY_WORKBOOK_TEMPLATE, PROPERTY_WORKBOOK_TEMPLATE_KEEP_SHEETS, PROPERTY_WRAP_TEXT, renderersCache, reportIndex, sheetIndex, sheetInfo, sheetNames, sheetNamesIndex, sheetNamesMap, sheetsBeforeCurrentReport, sheetsBeforeCurrentReportMap, workbookTemplate, XLS_EXPORTER_PROPERTIES_PREFIXallSelector, crtCompositeConfiguration, crtCompositeItemConfiguration, crtItem, dateFormatCache, EXCEPTION_MESSAGE_KEY_END_PAGE_INDEX_OUT_OF_RANGE, EXCEPTION_MESSAGE_KEY_INVALID_IMAGE_NAME, EXCEPTION_MESSAGE_KEY_INVALID_ZOOM_RATIO, EXCEPTION_MESSAGE_KEY_MIXED_CALLS_NOT_ALLOWED, EXCEPTION_MESSAGE_KEY_OUTPUT_WRITER_ERROR, EXCEPTION_MESSAGE_KEY_PAGE_INDEX_OUT_OF_RANGE, EXCEPTION_MESSAGE_KEY_START_PAGE_INDEX_OUT_OF_RANGE, exporterConfiguration, exporterContext, exporterInput, exporterOutput, filter, fontUtil, itemConfiguration, jasperPrint, jasperReportsContext, noBackcolorSelector, noneSelector, numberFormatCache, parameters, propertiesUtil, PROPERTY_DEFAULT_FILTER_FACTORY, PROPERTY_SUFFIX_DEFAULT_FILTER_FACTORY, rendererUtil, styledTextUtil, textValueClasses| Constructor and Description |
|---|
JRXlsxExporter() |
JRXlsxExporter(JasperReportsContext jasperReportsContext) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addBlankCell(JRExporterGridCell gridCell,
int colIndex,
int rowIndex) |
protected void |
addOccupiedCell(OccupiedGridCell occupiedGridCell,
int colIndex,
int rowIndex) |
protected void |
addRowBreak(int rowIndex) |
protected void |
closeSheet() |
protected void |
closeWorkbook(OutputStream os) |
protected void |
createSheet(CutsInfo xCuts,
JRXlsAbstractExporter.SheetInfo sheetInfo) |
protected void |
exportFrame(JRPrintFrame frame,
JRExporterGridCell gridCell,
int colIndex,
int rowIndex) |
protected void |
exportGenericElement(JRGenericPrintElement element,
JRExporterGridCell gridCell,
int colIndex,
int rowIndex,
int emptyCols,
int yCutsRow,
JRGridLayout layout) |
void |
exportImage(JRPrintImage image,
JRExporterGridCell gridCell,
int colIndex,
int rowIndex,
int emptyCols,
int yCutsRow,
JRGridLayout layout) |
protected void |
exportLine(JRPrintLine line,
JRExporterGridCell gridCell,
int colIndex,
int rowIndex) |
protected int |
exportPage(JRPrintPage page,
CutsInfo xCuts,
int startRow,
String defaultSheetName) |
protected void |
exportRectangle(JRPrintGraphicElement rectangle,
JRExporterGridCell gridCell,
int colIndex,
int rowIndex) |
protected void |
exportStyledText(JRStyle style,
JRStyledText styledText,
Locale locale,
boolean isStyledText) |
void |
exportText(JRPrintText text,
JRExporterGridCell gridCell,
int colIndex,
int rowIndex) |
protected String |
getAnchorType(ImageAnchorTypeEnum anchorType) |
protected Class<XlsxExporterConfiguration> |
getConfigurationInterface() |
protected String |
getDefinedName(String name) |
protected JRPrintElementIndex |
getElementIndex(JRExporterGridCell gridCell) |
String |
getExporterKey() |
String |
getExporterPropertiesPrefix()
Returns the properties prefix for the current exporter.
|
protected String |
getHyperlinkTarget(JRPrintHyperlink link) |
protected String |
getHyperlinkURL(JRPrintHyperlink link) |
JRPrintImage |
getImage(ExporterInput exporterInput,
JRPrintElementIndex imageIndex) |
protected Class<XlsxReportConfiguration> |
getItemConfigurationInterface() |
String |
getMacroTemplatePath()
Deprecated.
Replaced by
XlsxExporterConfiguration.getMacroTemplate(). |
static JRPrintElementIndex |
getPrintElementIndex(String imageName)
protected void writeImageMap(String imageMapName, JRPrintHyperlink mainHyperlink, List imageMapAreas) throws IOException
{
writer.write("\n");
}
protected void writeImageAreaCoordinates(JRPrintImageArea area) throws IOException
{
int[] coords = area.getCoordinates();
if (coords != null && coords.length > 0)
{
StringBuilder coordsEnum = new StringBuilder(coords.length * 4);
coordsEnum.append(coords[0]);
for (int i = 1; i < coords.length; i++)
{
coordsEnum.append(',');
coordsEnum.append(coords[i]);
}
writer.write(" coords=\"" + coordsEnum + "\"");
}
}
protected void writeImageAreaHyperlink(JRPrintHyperlink hyperlink) throws IOException
{
String href = getHyperlinkURL(hyperlink);
if (href == null)
{
writer.write(" nohref=\"nohref\"");
}
else
{
writer.write(" href=\"" + href + "\"");
String target = getHyperlinkTarget(hyperlink);
if (target != null)
{
writer.write(" target=\"");
writer.write(target);
writer.write("\"");
}
}
if (hyperlink.getHyperlinkTooltip() != null)
{
writer.write(" title=\"");
writer.write(JRStringUtil.xmlEncode(hyperlink.getHyperlinkTooltip()));
writer.write("\"");
}
}
/**
|
protected void |
initExport() |
protected void |
initReport() |
protected void |
insertPageAnchor(int colIndex,
int rowIndex) |
protected void |
openWorkbook(OutputStream os) |
protected void |
resetAutoFilters() |
protected void |
restoreBackcolor() |
protected void |
setAutoFilter(String autoFilterRange) |
protected void |
setBackcolor(Color color) |
protected void |
setBackground() |
protected void |
setColumnWidth(int col,
int width,
boolean autoFit) |
protected void |
setFreezePane(int rowIndex,
int colIndex) |
protected void |
setFreezePane(int rowIndex,
int colIndex,
boolean isRowEdge,
boolean isColumnEdge)
Deprecated.
to be removed; replaced by
setFreezePane(int, int) |
void |
setMacroTemplate(String macroTemplate)
Deprecated.
Replaced by
XlsxExporterConfiguration.getMacroTemplate(). |
protected void |
setRowHeight(int rowIndex,
int rowHeight,
Cut yCut,
XlsRowLevelInfo levelInfo) |
protected void |
setRowLevels(XlsRowLevelInfo levelInfo,
String level) |
protected void |
setScale(Integer scale) |
protected void |
setSheetName(String sheetName) |
calculateHeightForDinAN, calculateHeightForDinBN, calculateHeightForDinCN, calculateWidthForDinAN, calculateWidthForDinBN, calculateWidthForDinCN, ensureInput, ensureOutput, exportEmptyReport, exportReport, exportReportToStream, exportSheet, getColumIndexName, getColumnIndex, getColumnName, getConvertedPattern, getDefaultFont, getFormula, getImageBorderCorrection, getMaxRowsPerSheet, getNature, getSheetProps, getStyledText, getTextAlignHolder, getWorkbookTemplate, hasGlobalSheetNames, isCellHidden, isCellLocked, isIgnoreTextFormatting, isShrinkToFit, isUseTimeZone, isValidScale, isWorkbookTemplateKeepSheets, isWrapText, mergeAndSetRowLevels, setColumnWidths, setSheetNames, setWorkbookTemplate, setWorkbookTemplateKeepSheets, translateDateValuecreateFilter, defaultParseNumber, ensureJasperReportsContext, getBooleanCellValue, getCurrentConfiguration, getCurrentItemConfiguration, getCurrentJasperPrint, getCustomHandler, getDateCellValue, getDateFormat, getExporterContext, getExporterInput, getExporterOutput, getHyperlinkProducer, getJasperReportsContext, getLocale, getNumberCellValue, getNumberFormat, getOffsetX, getOffsetY, getPageRange, getParameter, getParameters, getPropertiesUtil, getRendererUtil, getReportContext, getStyledText, getTextFormatFactoryClass, getTextLocale, getTextTimeZone, getTextValue, getTextValueString, insideFrame, reset, resetClassLoader, resetExportContext, restoreElementOffsets, setClassLoader, setConfiguration, setConfiguration, setCurrentExporterInputItem, setExporterInput, setExporterOutput, setFrameElementsOffset, setJasperPrint, setJasperReportsContext, setOffset, setOffset, setParameter, setParameters, setReportContextpublic static final String XLSX_EXPORTER_KEY
GenericElementHandlerEnviroment.getElementHandler(JRGenericElementType, String).protected static final String XLSX_EXPORTER_PROPERTIES_PREFIX
protected static final String ONE_CELL
protected static final String TWO_CELL
protected static final String ABSOLUTE
public static final String PROPERTY_MACRO_TEMPLATE
XlsxExporterConfiguration.PROPERTY_MACRO_TEMPLATE.protected static final String JR_PAGE_ANCHOR_PREFIX
public static final String IMAGE_NAME_PREFIX
protected static final int IMAGE_NAME_PREFIX_LEGTH
protected XlsxZip xlsxZip
protected XlsxWorkbookHelper wbHelper
protected XlsxRelsHelper relsHelper
protected XlsxContentTypesHelper ctHelper
protected XlsxSheetHelper sheetHelper
protected XlsxSheetRelsHelper sheetRelsHelper
protected XlsxDrawingHelper drawingHelper
protected XlsxDrawingRelsHelper drawingRelsHelper
protected XlsxStyleHelper styleHelper
protected XlsxCellHelper cellHelper
protected StringBuilder definedNames
protected String firstSheetName
protected String currentSheetName
protected int tableIndex
protected boolean startPage
protected LinkedList<Color> backcolorStack
protected Color backcolor
protected String sheetAutoFilter
protected String macroTemplate
protected PrintPageFormat oldPageFormat
protected Integer currentSheetPageScale
protected Integer currentSheetFirstPageNumber
public JRXlsxExporter()
JRXlsxExporter(JasperReportsContext)public JRXlsxExporter(JasperReportsContext jasperReportsContext)
protected Class<XlsxExporterConfiguration> getConfigurationInterface()
protected Class<XlsxReportConfiguration> getItemConfigurationInterface()
protected void initExport()
initExport in class JRXlsAbstractExporter<XlsxReportConfiguration,XlsxExporterConfiguration,JRXlsxExporterContext>protected void initReport()
initReport in class JRXlsAbstractExporter<XlsxReportConfiguration,XlsxExporterConfiguration,JRXlsxExporterContext>protected int exportPage(JRPrintPage page, CutsInfo xCuts, int startRow, String defaultSheetName) throws JRException
exportPage in class JRXlsAbstractExporter<XlsxReportConfiguration,XlsxExporterConfiguration,JRXlsxExporterContext>JRExceptionpublic JRPrintImage getImage(ExporterInput exporterInput, JRPrintElementIndex imageIndex) throws JRException
JRExceptionprotected void exportStyledText(JRStyle style, JRStyledText styledText, Locale locale, boolean isStyledText)
protected JRPrintElementIndex getElementIndex(JRExporterGridCell gridCell)
public static JRPrintElementIndex getPrintElementIndex(String imageName)
protected void setBackcolor(Color color)
protected void restoreBackcolor()
protected String getHyperlinkTarget(JRPrintHyperlink link)
protected String getHyperlinkURL(JRPrintHyperlink link)
protected void insertPageAnchor(int colIndex,
int rowIndex)
protected void addBlankCell(JRExporterGridCell gridCell, int colIndex, int rowIndex) throws JRException
addBlankCell in class JRXlsAbstractExporter<XlsxReportConfiguration,XlsxExporterConfiguration,JRXlsxExporterContext>JRExceptionprotected void closeWorkbook(OutputStream os) throws JRException
closeWorkbook in class JRXlsAbstractExporter<XlsxReportConfiguration,XlsxExporterConfiguration,JRXlsxExporterContext>JRExceptionprotected void createSheet(CutsInfo xCuts, JRXlsAbstractExporter.SheetInfo sheetInfo)
createSheet in class JRXlsAbstractExporter<XlsxReportConfiguration,XlsxExporterConfiguration,JRXlsxExporterContext>protected void closeSheet()
closeSheet in class JRXlsAbstractExporter<XlsxReportConfiguration,XlsxExporterConfiguration,JRXlsxExporterContext>protected void exportFrame(JRPrintFrame frame, JRExporterGridCell gridCell, int colIndex, int rowIndex) throws JRException
exportFrame in class JRXlsAbstractExporter<XlsxReportConfiguration,XlsxExporterConfiguration,JRXlsxExporterContext>JRExceptionpublic void exportImage(JRPrintImage image, JRExporterGridCell gridCell, int colIndex, int rowIndex, int emptyCols, int yCutsRow, JRGridLayout layout) throws JRException
exportImage in class JRXlsAbstractExporter<XlsxReportConfiguration,XlsxExporterConfiguration,JRXlsxExporterContext>JRExceptionprotected void exportLine(JRPrintLine line, JRExporterGridCell gridCell, int colIndex, int rowIndex) throws JRException
exportLine in class JRXlsAbstractExporter<XlsxReportConfiguration,XlsxExporterConfiguration,JRXlsxExporterContext>JRExceptionprotected void exportRectangle(JRPrintGraphicElement rectangle, JRExporterGridCell gridCell, int colIndex, int rowIndex) throws JRException
exportRectangle in class JRXlsAbstractExporter<XlsxReportConfiguration,XlsxExporterConfiguration,JRXlsxExporterContext>JRExceptionpublic void exportText(JRPrintText text, JRExporterGridCell gridCell, int colIndex, int rowIndex) throws JRException
exportText in class JRXlsAbstractExporter<XlsxReportConfiguration,XlsxExporterConfiguration,JRXlsxExporterContext>JRExceptionprotected void exportGenericElement(JRGenericPrintElement element, JRExporterGridCell gridCell, int colIndex, int rowIndex, int emptyCols, int yCutsRow, JRGridLayout layout) throws JRException
exportGenericElement in class JRXlsAbstractExporter<XlsxReportConfiguration,XlsxExporterConfiguration,JRXlsxExporterContext>JRExceptionprotected void openWorkbook(OutputStream os) throws JRException
openWorkbook in class JRXlsAbstractExporter<XlsxReportConfiguration,XlsxExporterConfiguration,JRXlsxExporterContext>JRExceptionprotected void setBackground()
protected void addOccupiedCell(OccupiedGridCell occupiedGridCell, int colIndex, int rowIndex)
addOccupiedCell in class JRXlsAbstractExporter<XlsxReportConfiguration,XlsxExporterConfiguration,JRXlsxExporterContext>protected void setColumnWidth(int col,
int width,
boolean autoFit)
setColumnWidth in class JRXlsAbstractExporter<XlsxReportConfiguration,XlsxExporterConfiguration,JRXlsxExporterContext>protected void setRowHeight(int rowIndex,
int rowHeight,
Cut yCut,
XlsRowLevelInfo levelInfo)
throws JRException
setRowHeight in class JRXlsAbstractExporter<XlsxReportConfiguration,XlsxExporterConfiguration,JRXlsxExporterContext>JRExceptionprotected void addRowBreak(int rowIndex)
addRowBreak in class JRXlsAbstractExporter<XlsxReportConfiguration,XlsxExporterConfiguration,JRXlsxExporterContext>public String getExporterKey()
public String getExporterPropertiesPrefix()
JRAbstractExportergetExporterPropertiesPrefix in class JRAbstractExporter<XlsxReportConfiguration,XlsxExporterConfiguration,OutputStreamExporterOutput,JRXlsxExporterContext>protected void setFreezePane(int rowIndex,
int colIndex)
setFreezePane in class JRXlsAbstractExporter<XlsxReportConfiguration,XlsxExporterConfiguration,JRXlsxExporterContext>protected void setFreezePane(int rowIndex,
int colIndex,
boolean isRowEdge,
boolean isColumnEdge)
setFreezePane(int, int)setFreezePane in class JRXlsAbstractExporter<XlsxReportConfiguration,XlsxExporterConfiguration,JRXlsxExporterContext>protected void setSheetName(String sheetName)
setSheetName in class JRXlsAbstractExporter<XlsxReportConfiguration,XlsxExporterConfiguration,JRXlsxExporterContext>protected void setAutoFilter(String autoFilterRange)
setAutoFilter in class JRXlsAbstractExporter<XlsxReportConfiguration,XlsxExporterConfiguration,JRXlsxExporterContext>protected void resetAutoFilters()
protected void setRowLevels(XlsRowLevelInfo levelInfo, String level)
setRowLevels in class JRXlsAbstractExporter<XlsxReportConfiguration,XlsxExporterConfiguration,JRXlsxExporterContext>public String getMacroTemplatePath()
XlsxExporterConfiguration.getMacroTemplate().public void setMacroTemplate(String macroTemplate)
XlsxExporterConfiguration.getMacroTemplate().protected void setScale(Integer scale)
protected String getAnchorType(ImageAnchorTypeEnum anchorType)
Copyright © 2017. All rights reserved.