Class XlsxFormatter
java.lang.Object
io.jmix.reports.yarg.formatters.impl.AbstractFormatter
io.jmix.reports.yarg.formatters.impl.XlsxFormatter
- All Implemented Interfaces:
- ReportFormatter
- Direct Known Subclasses:
- JmixXlsxFormatter
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionprotected static classprotected classprotected static classNested classes/interfaces inherited from class io.jmix.reports.yarg.formatters.impl.AbstractFormatterAbstractFormatter.BandPathAndParameterName, AbstractFormatter.InlinerAndMatcher
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected BandsForRangesprotected DocumentConverterprotected booleanprotected XslxHintProcessorprotected Set<XlsxFormatter.CellWithBand>protected jakarta.xml.bind.Marshallerprotected Set<XlsxFormatter.CellWithBand>protected BandDataprotected intprotected RangeDependenciesprotected Documentprotected Documentprotected jakarta.xml.bind.UnmarshallerFields inherited from class io.jmix.reports.yarg.formatters.impl.AbstractFormatterALIAS_GROUP, ALIAS_WITH_BAND_NAME_PATTERN, ALIAS_WITH_BAND_NAME_REGEXP, BAND_NAME_DECLARATION_PATTERN, BAND_NAME_DECLARATION_REGEXP, contentInliners, defaultFormatProvider, groovyScriptParametersProvider, outputStream, outputType, reportTemplate, rootBand, scripting, SIMPLE_ALIAS_REGEXP, STRING_FUNCTION_GROUP, supportedOutputTypes, UNIVERSAL_ALIAS_PATTERN, UNIVERSAL_ALIAS_REGEXP, VALUE
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidaddFormulaForPostProcessing(Range templateRange, BandData bandData, org.xlsx4j.sml.Row newRow, org.xlsx4j.sml.Cell templateCell, org.xlsx4j.sml.Cell newCell) protected RangecalculateFormulaRangeChange(Range formulaRange, Range templateRange, List<Range> resultRanges) protected XlsxFormatter.OffsetcalculateOffset(Range from, Range to) protected org.xlsx4j.sml.CellcopyCell(org.xlsx4j.sml.Cell cell) protected List<org.xlsx4j.sml.Cell>copyCells(Range templateRange, BandData bandData, org.xlsx4j.sml.Row newRow, List<org.xlsx4j.sml.Cell> templateCells) protected List<org.xlsx4j.sml.Cell>copyCells(BandData band, Range templateRange, List<org.xlsx4j.sml.Row> resultSheetRows, org.xlsx4j.sml.Row firstRow, org.xlsx4j.sml.Worksheet resultSheet) protected voidcopyRowSettings(org.xlsx4j.sml.Row templateRow, org.xlsx4j.sml.Row newRow, org.xlsx4j.sml.Worksheet templateWorksheet, org.xlsx4j.sml.Worksheet resultWorksheet) protected voidcreateFakeTemplateCellsForEmptyOnes(Range oneRowRange, Map<CellReference, org.xlsx4j.sml.Cell> cellsForOneRowRange, List<org.xlsx4j.sml.Cell> templateCells) XLSX document does not store empty cells and it might be an issue for formula calculations and etc.protected org.xlsx4j.sml.RowcreateNewRow(org.xlsx4j.sml.Worksheet resultSheet) protected org.xlsx4j.sml.RowensureNecessaryRowsCreated(Range templateRange, org.xlsx4j.sml.Worksheet resultSheet, org.xlsx4j.sml.Row firstRow) protected ByteArrayOutputStreamevaluateFormulas(byte[] content) byte[]extractTemplateImages(ReportTemplate reportTemplate) protected org.xlsx4j.sml.RowfindNextRowForChildBand(BandData band, Range templateRange, List<org.xlsx4j.sml.Row> resultSheetRows) protected org.xlsx4j.sml.RowfindNextRowForFirstRender(Range templateRange, List<org.xlsx4j.sml.Row> resultSheetRows) protected org.xlsx4j.sml.RowfindNextRowForHBand(BandData band, Range templateRange, List<org.xlsx4j.sml.Row> resultSheetRows) protected org.xlsx4j.sml.RowfindNextRowForVBand(BandData band, Range templateRange, List<org.xlsx4j.sml.Row> resultSheetRows) protected voidprotected RangegetBandRange(BandData band) protected <T> Tprotected <T> Tprotected Rangeprotected org.xlsx4j.sml.WorksheetgetTemplateWorksheet(org.xlsx4j.sml.Row newRow) protected org.xlsx4j.sml.WorksheetgetWorksheet(org.xlsx4j.sml.Row newRow) protected voidinit()protected StringinsertBandDataToString(String resultStr) protected booleanisCellInBand(String sheetName, int row, int col) protected booleanprotected voidprotected voidvoidCreates document and serializes it to predefined stream (or something like this)protected voidprotected voidsaveXlsxAsCsv(Document document, OutputStream outputStream) voidsetDocumentConverter(DocumentConverter documentConverter) voidsetFormulasPostProcessingEvaluationEnabled(boolean formulasPostProcessingEvaluationEnabled) protected voidshiftChart(Document.ChartWrapper chart, Range templateRange, Range firstResultRange) protected voidupdateCell(org.docx4j.openpackaging.parts.SpreadsheetML.WorksheetPart worksheetPart, BandData bandData, org.xlsx4j.sml.Cell newCell) protected voidprotected voidprotected voidupdateFormula(org.xlsx4j.sml.Cell cellWithFormula, Range originalFormulaRange, Range formulaRange) protected voidprotected voidprotected voidprotected voidprotected voidprotected voidupdateRangeMappings(BandData band, Range templateRange, List<org.xlsx4j.sml.Cell> resultCells) protected voidprotected voidprotected voidprotected voidwriteHBand(BandData band) protected voidwriteToOutputStream(org.docx4j.openpackaging.packages.SpreadsheetMLPackage mlPackage, OutputStream outputStream) protected voidwriteVBand(BandData band) Methods inherited from class io.jmix.reports.yarg.formatters.impl.AbstractFormatterapplyStringFunction, checkThreadInterrupted, containsJustOneAlias, createDocument, defaultFormat, findBandByPath, formatValue, formatValue, getAllAliases, getContentInlinerForFormat, getContentInliners, getFormatString, getFullParameterName, inlineParameterValue, insertBandDataToString, isGroovyScript, separateBandNameAndParameterName, setContentInliners, setDefaultFormatProvider, setScripting, unwrapParameterName, wrapWithReportingException, wrapWithReportingException
- 
Field Details- 
documentConverter
- 
template
- 
result
- 
rangeDependencies
- 
bandsForRanges
- 
rangeVerticalIntersections
- 
innerFormulas
- 
outerFormulas
- 
templateImages
- 
lastRenderedRangeForBandName
- 
lastRowForSheet
- 
hintProcessor
- 
previousRangeBandData
- 
previousRangesRightOffsetprotected int previousRangesRightOffset
- 
formulasPostProcessingEvaluationEnabledprotected boolean formulasPostProcessingEvaluationEnabled
- 
unmarshallerprotected jakarta.xml.bind.Unmarshaller unmarshaller
- 
marshallerprotected jakarta.xml.bind.Marshaller marshaller
 
- 
- 
Constructor Details- 
XlsxFormatter
 
- 
- 
Method Details- 
setDocumentConverter
- 
setFormulasPostProcessingEvaluationEnabledpublic void setFormulasPostProcessingEvaluationEnabled(boolean formulasPostProcessingEvaluationEnabled) 
- 
renderDocumentpublic void renderDocument()Description copied from interface:ReportFormatterCreates document and serializes it to predefined stream (or something like this)
- 
validateTemplateContainsNamedRangeprotected void validateTemplateContainsNamedRange()
- 
saveAndCloseprotected void saveAndClose()
- 
isFormulasPostProcessingEvaluationRequiredprotected boolean isFormulasPostProcessingEvaluationRequired()
- 
evaluateFormulas
- 
isCellInBand
- 
extractTemplateImages
- 
initprotected void init()
- 
findVerticalDependenciesprotected void findVerticalDependencies()
- 
updateOutlinesprotected void updateOutlines()
- 
updateChartsprotected void updateCharts()
- 
shiftChart
- 
updateFormulasprotected void updateFormulas()
- 
updateConditionalFormattingprotected void updateConditionalFormatting()
- 
processOuterFormulasprotected void processOuterFormulas()
- 
calculateFormulaRangeChange
- 
processInnerFormulasprotected void processInnerFormulas()
- 
updateFormula
- 
calculateOffset
- 
updatePivotTablesprotected void updatePivotTables()
- 
updateMergeRegionsprotected void updateMergeRegions()
- 
writeBand
- 
writeHBand
- 
writeVBand
- 
updateRangeMappings
- 
findNextRowForHBand
- 
findNextRowForVBand
- 
findNextRowForChildBand
- 
findNextRowForFirstRender
- 
ensureNecessaryRowsCreatedprotected org.xlsx4j.sml.Row ensureNecessaryRowsCreated(Range templateRange, org.xlsx4j.sml.Worksheet resultSheet, org.xlsx4j.sml.Row firstRow) 
- 
copyCells
- 
createFakeTemplateCellsForEmptyOnesprotected void createFakeTemplateCellsForEmptyOnes(Range oneRowRange, Map<CellReference, org.xlsx4j.sml.Cell> cellsForOneRowRange, List<org.xlsx4j.sml.Cell> templateCells) XLSX document does not store empty cells and it might be an issue for formula calculations and etc. So we need to create fake template cell for each empty cell.
- 
getLastRenderedBandForThisLevel
- 
getBandRange
- 
createNewRowprotected org.xlsx4j.sml.Row createNewRow(org.xlsx4j.sml.Worksheet resultSheet) 
- 
copyCells
- 
copyCellprotected org.xlsx4j.sml.Cell copyCell(org.xlsx4j.sml.Cell cell) 
- 
getWorksheetprotected org.xlsx4j.sml.Worksheet getWorksheet(org.xlsx4j.sml.Row newRow) 
- 
getTemplateWorksheetprotected org.xlsx4j.sml.Worksheet getTemplateWorksheet(org.xlsx4j.sml.Row newRow) 
- 
addFormulaForPostProcessing
- 
copyRowSettingsprotected void copyRowSettings(org.xlsx4j.sml.Row templateRow, org.xlsx4j.sml.Row newRow, org.xlsx4j.sml.Worksheet templateWorksheet, org.xlsx4j.sml.Worksheet resultWorksheet) 
- 
updateCellprotected void updateCell(org.docx4j.openpackaging.parts.SpreadsheetML.WorksheetPart worksheetPart, BandData bandData, org.xlsx4j.sml.Cell newCell) 
- 
getFirst
- 
getLast
- 
saveXlsxAsCsvprotected void saveXlsxAsCsv(Document document, OutputStream outputStream) throws IOException, org.docx4j.openpackaging.exceptions.Docx4JException - Throws:
- IOException
- org.docx4j.openpackaging.exceptions.Docx4JException
 
- 
writeToOutputStreamprotected void writeToOutputStream(org.docx4j.openpackaging.packages.SpreadsheetMLPackage mlPackage, OutputStream outputStream) throws org.docx4j.openpackaging.exceptions.Docx4JException - Throws:
- org.docx4j.openpackaging.exceptions.Docx4JException
 
- 
updateSheetNamesprotected void updateSheetNames()
- 
insertBandDataToString
 
-