Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue in Excel Output while using SXSSF Transformer with JXLS (>=2.7.0) #153

Closed
vaibhavk311 opened this issue Dec 14, 2021 · 24 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@vaibhavk311
Copy link

vaibhavk311 commented Dec 14, 2021

Hey Team,

I've observed that the static cells are getting erased in output when I'm using SXSSF transformer to transform and apply the area as per the comments from template.

I'm using JXLS 2.11.0 and JXLS-POI 2.11.0.

Moreover I've noted that such behavior is observed in versions newer that JXLS 2.7.0 with SXSSF Transformer

This behavior exists with fixed set of pattern i.e. in which static cell is either to left or right of iterated cell.

Sample Template

Output : JXLS 2.11.0 Output

Note that A3 cell("Manager") from Template is erased.

Any comments/lead/resolution if bug would be highly appreciated

@vaibhavk311 vaibhavk311 added the bug Something isn't working label Dec 14, 2021
@vaibhavk311

This comment was marked as resolved.

@SoltauFintel
Copy link
Member

SoltauFintel commented Dec 15, 2021

in general: You can not use Streaming for everything. Usually it's used for 1 simple data list on 1 sheet.

So it works before 2.7.0 (what version have you tested?) and does not work with 2.11.0 ? (Maybe caused by PR #70 ..?)

@SoltauFintel SoltauFintel self-assigned this Dec 15, 2021
@vaibhavk311
Copy link
Author

@SoltauFintel It works fine for JXLS 2.6.x version but it is breaking for versions greater that (>=2.7.0).
Can you help us out here in case we want to preserve the same functionality offered in 2.7.x but for 2.11.0 JXLS-Version ?

@SoltauFintel
Copy link
Member

If you want to speed things up you can push a PR containing a (failin') testcasse. Or maybe in the 2nd step search for the bug.

@SoltauFintel
Copy link
Member

I cannot reproduce this. In my opinion you cannot use streaming for this template.

We need a testcase; pushed as PR. Please create the template from scratch using only Microsoft Excel.

@SoltauFintel SoltauFintel added missing-example Provide example and code as a PR. Which version? waiting-for-pr labels Dec 16, 2021
@SoltauFintel SoltauFintel removed their assignment Dec 16, 2021
@vaibhavk311
Copy link
Author

@SoltauFintel
Can you please give me the access to Push the PR(Code) to a remote branch.
My githubId is vaibhavk311
Currently it says that :
remote: Permission to jxlsteam/jxls.git denied to vaibhavk311.
fatal: unable to access 'https://github.com/jxlsteam/jxls.git/': The requested URL returned error: 403

@SoltauFintel
Copy link
Member

@vaibhavk311
Copy link
Author

Sure thanks @SoltauFintel
PR : #155

@SoltauFintel
Copy link
Member

@vaibhavk311
Did you recreate the template from scratch using MS Excel? Sometimes templates are just broken.

@vaibhavk311
Copy link
Author

@SoltauFintel yes i recreated it from scratch

@SoltauFintel SoltauFintel self-assigned this Dec 17, 2021
@SoltauFintel
Copy link
Member

SoltauFintel commented Dec 17, 2021

Analysis

  • cause is not PR #68 clearCellValue workaround for every setCellFormula() call #70
  • cause is not POI 4.1.0 (same error with 4.0.1)
  • yes, works with tag v2.6.0
  • yes, works not with tag 2.7.0
  • cause is commit 5354bea
    issue 160 - add isForwardOnly() method to Transformer and processing static cells differently depending on this flag
    issue#160 jx:each with direction=RIGHT with SXSSF Transformer rewrites static cells
    (we cannot read the old issue at the moment...)
    First released with 2.7.0

SoltauFintel added a commit that referenced this issue Dec 17, 2021
@vaibhavk311
Copy link
Author

@SoltauFintel Thanks for RCA :)
What is the resolution to be made

@SoltauFintel
Copy link
Member

What means RCA?

@SoltauFintel SoltauFintel assigned leonate and unassigned SoltauFintel Dec 17, 2021
@SoltauFintel SoltauFintel removed missing-example Provide example and code as a PR. Which version? waiting-for-pr labels Dec 17, 2021
@SoltauFintel
Copy link
Member

SoltauFintel commented Dec 17, 2021

@vaibhavk311
Let's wait for leonate.
You could try to set transformer.forwardOnly to false.

@vaibhavk311
Copy link
Author

@SoltauFintel
RCA-> Root Cause Analysis
Sure i'll try doing this but transformer.forwardOnly will not support streaming right ?

@leonate
Copy link
Member

leonate commented Dec 17, 2021

AFAIR isForwardOnly property was introduced to differentiate between streaming and not streaming transformers
public boolean isForwardOnly() { return isStreaming(); }

With a streaming transformer (SXSSF) we cannot rewrite already written cells.
But I suppose some regression was introduced with the change. The original bug link is https://bitbucket.org/leonate/jxls/issues/160/jx-each-with-direction-right-with-sxssf .

@vaibhavk311
Copy link
Author

@leonate
Thanks for the response :)
What is the resolution to be made

@ankurkumarHL
Copy link

ankurkumarHL commented Dec 22, 2021

@vaibhavk311 I am facing same issue in, did you get the solution or work around?

@ankurkumarHL
Copy link

@leonate when can we expect this regression to be fixed?

@SoltauFintel
Copy link
Member

There's no solution yet. See comment in PR 156. JXLS is no full-time project. It's done when it's done. :-) And there is no release date yet.

SoltauFintel added a commit that referenced this issue Dec 22, 2021
leonate added a commit that referenced this issue Dec 27, 2021
leonate added a commit that referenced this issue Dec 27, 2021
…ea (#159)

* issue #153 - fixed processing of static cells for every row in XLS area
@leonate
Copy link
Member

leonate commented Dec 27, 2021

The issue fixed in pull request #159

@leonate leonate closed this as completed Dec 27, 2021
@vaibhavk311
Copy link
Author

Thanks @leonate , @SoltauFintel :)
Just one Quick Question :
Will it be released in JXLS - 2.12.0 Version ?

@leonate
Copy link
Member

leonate commented Dec 28, 2021

Will it be released in JXLS - 2.12.0 Version ?

That's the plan.

@SoltauFintel
Copy link
Member

This change causes error #173

leonate added a commit that referenced this issue May 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants