SelectSheetsForStreamingPoiTransformer not working correctly
See original GitHub issueHi,
I am using the example here: https://github.com/jxlsteam/jxls/blob/master/jxls-poi/src/test/java/org/jxls/examples/stress/SxssfDemo.java
method: simpleSxssf()
I am trying to use the SelectSheetsForStreamingPoiTransformer like this:
I copy the sheet “Template” into a second sheet “NoStreaming”. I adapt the method simpleSxssf() to only stream the “Template” sheet:
Context context = new Context();
context.putVar("cellRefUpdater", new CellRefUpdater());
context.putVar("employees", employees);
context.getConfig().setIsFormulaProcessingRequired(false);
Workbook workbook = WorkbookFactory.create(is);
SelectSheetsForStreamingPoiTransformer transformer = new SelectSheetsForStreamingPoiTransformer(workbook);
Set<String> streamingSheets = new HashSet<>();
streamingSheets.add("Template");
transformer.setDataSheetsToUseStreaming(streamingSheets);
//transformer.setEvaluateFormulas(true); // used with newest JXLS version
processTemplate(context, transformer);
workbook.write(os);
private void processTemplate(Context context, Transformer transformer) {
XlsCommentAreaBuilder areaBuilder = new XlsCommentAreaBuilder();
areaBuilder.setTransformer(transformer);
List<Area> xlsAreaList = areaBuilder.build();
for (Area xlsArea : xlsAreaList) {
xlsArea.applyAt(new CellRef(xlsArea.getStartCellRef().getCellName()), context);
}
}
but I am getting the outputs in the screenshot. What is going wrong here?
Using jxls 2.8.1
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
JXLS - how to write data to workbook in batches - Stack Overflow
I have to implement export of users into XLS. After a little research JXLS came up as simple solution, but there is one...
Read more >Version History - JXLS - - SourceForge
9.0. With this version we migrated from BitBucket to Github. A list of resolved issues. #1: Javadoc · #2: moved jxls ...
Read more >leonate / jxls / issues - Bitbucket
Title T P Status Assignee Version Creat...
#164: Remove jexcel task minor resolved 2.7.0 2019...
#140: Mono repo jxls‑demo into jxls · jxls task major...
Read more >FIND not working in Excel? Which one was your problem?
00:00 FIND not finding something that is there00:15 FIND not looking in the correct area00:52 FIND looking IN the formula NOT the resultant ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok, for completeness, this code seems to work for SelectSheetsForStreamingPoiTransformer:
Hi SoltauFintel ,
how exactly do you mean this? transformer.getWorkbook(); only gives a workbook back. So where to use this workbook in the code ?