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 Summary
Modifier and TypeClassDescriptionprotected static class
protected class
protected static class
Nested classes/interfaces inherited from class io.jmix.reports.yarg.formatters.impl.AbstractFormatter
AbstractFormatter.BandPathAndParameterName, AbstractFormatter.InlinerAndMatcher
-
Field Summary
Modifier and TypeFieldDescriptionprotected BandsForRanges
protected DocumentConverter
protected boolean
protected XslxHintProcessor
protected Set<XlsxFormatter.CellWithBand>
protected jakarta.xml.bind.Marshaller
protected Set<XlsxFormatter.CellWithBand>
protected BandData
protected int
protected RangeDependencies
protected Document
protected Document
protected jakarta.xml.bind.Unmarshaller
Fields inherited from class io.jmix.reports.yarg.formatters.impl.AbstractFormatter
ALIAS_GROUP, ALIAS_WITH_BAND_NAME_PATTERN, ALIAS_WITH_BAND_NAME_REGEXP, BAND_NAME_DECLARATION_PATTERN, BAND_NAME_DECLARATION_REGEXP, contentInliners, defaultFormatProvider, outputStream, outputType, reportTemplate, rootBand, scripting, SIMPLE_ALIAS_REGEXP, STRING_FUNCTION_GROUP, supportedOutputTypes, UNIVERSAL_ALIAS_PATTERN, UNIVERSAL_ALIAS_REGEXP, VALUE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addFormulaForPostProcessing
(Range templateRange, BandData bandData, org.xlsx4j.sml.Row newRow, org.xlsx4j.sml.Cell templateCell, org.xlsx4j.sml.Cell newCell) protected Range
calculateFormulaRangeChange
(Range formulaRange, Range templateRange, List<Range> resultRanges) protected XlsxFormatter.Offset
calculateOffset
(Range from, Range to) protected org.xlsx4j.sml.Cell
copyCell
(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 void
copyRowSettings
(org.xlsx4j.sml.Row templateRow, org.xlsx4j.sml.Row newRow, org.xlsx4j.sml.Worksheet templateWorksheet, org.xlsx4j.sml.Worksheet resultWorksheet) protected 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.protected org.xlsx4j.sml.Row
createNewRow
(org.xlsx4j.sml.Worksheet resultSheet) protected org.xlsx4j.sml.Row
ensureNecessaryRowsCreated
(Range templateRange, org.xlsx4j.sml.Worksheet resultSheet, org.xlsx4j.sml.Row firstRow) protected ByteArrayOutputStream
evaluateFormulas
(byte[] content) protected org.xlsx4j.sml.Row
findNextRowForChildBand
(BandData band, Range templateRange, List<org.xlsx4j.sml.Row> resultSheetRows) protected org.xlsx4j.sml.Row
findNextRowForFirstRender
(Range templateRange, List<org.xlsx4j.sml.Row> resultSheetRows) protected org.xlsx4j.sml.Row
findNextRowForHBand
(BandData band, Range templateRange, List<org.xlsx4j.sml.Row> resultSheetRows) protected org.xlsx4j.sml.Row
findNextRowForVBand
(BandData band, Range templateRange, List<org.xlsx4j.sml.Row> resultSheetRows) protected void
protected Range
getBandRange
(BandData band) protected <T> T
protected <T> T
protected Range
protected org.xlsx4j.sml.Worksheet
getTemplateWorksheet
(org.xlsx4j.sml.Row newRow) protected org.xlsx4j.sml.Worksheet
getWorksheet
(org.xlsx4j.sml.Row newRow) protected void
init()
protected String
insertBandDataToString
(String resultStr) protected boolean
protected void
protected void
void
Creates document and serializes it to predefined stream (or something like this)protected void
protected void
saveXlsxAsCsv
(Document document, OutputStream outputStream) void
setDocumentConverter
(DocumentConverter documentConverter) void
setFormulasPostProcessingEvaluationEnabled
(boolean formulasPostProcessingEvaluationEnabled) protected void
shiftChart
(Document.ChartWrapper chart, Range templateRange, Range firstResultRange) protected void
updateCell
(org.docx4j.openpackaging.parts.SpreadsheetML.WorksheetPart worksheetPart, BandData bandData, org.xlsx4j.sml.Cell newCell) protected void
protected void
protected void
updateFormula
(org.xlsx4j.sml.Cell cellWithFormula, Range originalFormulaRange, Range formulaRange) protected void
protected void
protected void
protected void
protected void
protected void
updateRangeMappings
(BandData band, Range templateRange, List<org.xlsx4j.sml.Cell> resultCells) protected void
protected void
protected void
protected void
writeHBand
(BandData band) protected void
writeToOutputStream
(org.docx4j.openpackaging.packages.SpreadsheetMLPackage mlPackage, OutputStream outputStream) protected void
writeVBand
(BandData band) Methods inherited from class io.jmix.reports.yarg.formatters.impl.AbstractFormatter
applyStringFunction, checkThreadInterrupted, containsJustOneAlias, createDocument, defaultFormat, findBandByPath, formatValue, formatValue, getAllAliases, getContentInlinerForFormat, getContentInliners, getFormatString, inlineParameterValue, insertBandDataToString, isGroovyScript, separateBandNameAndParameterName, setContentInliners, setDefaultFormatProvider, setScripting, unwrapParameterName, wrapWithReportingException, wrapWithReportingException
-
Field Details
-
documentConverter
-
template
-
result
-
rangeDependencies
-
bandsForRanges
-
rangeVerticalIntersections
-
innerFormulas
-
outerFormulas
-
lastRenderedRangeForBandName
-
lastRowForSheet
-
hintProcessor
-
previousRangeBandData
-
previousRangesRightOffset
protected int previousRangesRightOffset -
formulasPostProcessingEvaluationEnabled
protected boolean formulasPostProcessingEvaluationEnabled -
unmarshaller
protected jakarta.xml.bind.Unmarshaller unmarshaller -
marshaller
protected jakarta.xml.bind.Marshaller marshaller
-
-
Constructor Details
-
XlsxFormatter
-
-
Method Details
-
setDocumentConverter
-
setFormulasPostProcessingEvaluationEnabled
public void setFormulasPostProcessingEvaluationEnabled(boolean formulasPostProcessingEvaluationEnabled) -
renderDocument
public void renderDocument()Description copied from interface:ReportFormatter
Creates document and serializes it to predefined stream (or something like this) -
validateTemplateContainsNamedRange
protected void validateTemplateContainsNamedRange() -
saveAndClose
protected void saveAndClose() -
isFormulasPostProcessingEvaluationRequired
protected boolean isFormulasPostProcessingEvaluationRequired() -
evaluateFormulas
-
init
protected void init() -
findVerticalDependencies
protected void findVerticalDependencies() -
updateOutlines
protected void updateOutlines() -
updateCharts
protected void updateCharts() -
shiftChart
-
updateFormulas
protected void updateFormulas() -
updateConditionalFormatting
protected void updateConditionalFormatting() -
processOuterFormulas
protected void processOuterFormulas() -
calculateFormulaRangeChange
-
processInnerFormulas
protected void processInnerFormulas() -
updateFormula
-
calculateOffset
-
updatePivotTables
protected void updatePivotTables() -
updateMergeRegions
protected void updateMergeRegions() -
writeBand
-
writeHBand
-
writeVBand
-
updateRangeMappings
-
findNextRowForHBand
-
findNextRowForVBand
-
findNextRowForChildBand
-
findNextRowForFirstRender
-
ensureNecessaryRowsCreated
protected org.xlsx4j.sml.Row ensureNecessaryRowsCreated(Range templateRange, org.xlsx4j.sml.Worksheet resultSheet, org.xlsx4j.sml.Row firstRow) -
copyCells
-
createFakeTemplateCellsForEmptyOnes
protected 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
-
createNewRow
protected org.xlsx4j.sml.Row createNewRow(org.xlsx4j.sml.Worksheet resultSheet) -
copyCells
-
copyCell
protected org.xlsx4j.sml.Cell copyCell(org.xlsx4j.sml.Cell cell) -
getWorksheet
protected org.xlsx4j.sml.Worksheet getWorksheet(org.xlsx4j.sml.Row newRow) -
getTemplateWorksheet
protected org.xlsx4j.sml.Worksheet getTemplateWorksheet(org.xlsx4j.sml.Row newRow) -
addFormulaForPostProcessing
-
copyRowSettings
protected void copyRowSettings(org.xlsx4j.sml.Row templateRow, org.xlsx4j.sml.Row newRow, org.xlsx4j.sml.Worksheet templateWorksheet, org.xlsx4j.sml.Worksheet resultWorksheet) -
updateCell
protected void updateCell(org.docx4j.openpackaging.parts.SpreadsheetML.WorksheetPart worksheetPart, BandData bandData, org.xlsx4j.sml.Cell newCell) -
getFirst
-
getLast
-
saveXlsxAsCsv
protected void saveXlsxAsCsv(Document document, OutputStream outputStream) throws IOException, org.docx4j.openpackaging.exceptions.Docx4JException - Throws:
IOException
org.docx4j.openpackaging.exceptions.Docx4JException
-
writeToOutputStream
protected void writeToOutputStream(org.docx4j.openpackaging.packages.SpreadsheetMLPackage mlPackage, OutputStream outputStream) throws org.docx4j.openpackaging.exceptions.Docx4JException - Throws:
org.docx4j.openpackaging.exceptions.Docx4JException
-
updateSheetNames
protected void updateSheetNames() -
insertBandDataToString
-