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
[BUG] Error When Evaluating Formula Referencing Other Sheet #2337
Comments
Sounds like a duplicate of #2392. A PR was submitted, will be in upcoming release. |
@patrickbrouwers I'm also getting this exception: I have required the latest 3.1 branch instead of a release, the PR makes no difference to this particular issue. |
OP is correct that removing the disconnect call solves the problem. Could this potentially be a concern? DoesNotDisconnect... something along them lines? then a check can be performed to not disconnect that particular sheet. Understandably this could present memory problems for larger spreadsheets. This would also need changing the ReadChunk job. |
@plogic-aaron as said before, a fix has been merged and will be in next release. |
@patrickbrouwers thanks, but as said i required 3.1 branch at latest commit to see the fix and still the same issue, so has this been merged in a different branch? Edit: changing the order of the import so that sheet 2 (that references sheet 1) is processed first solves the problem also, this is clearly because both are still loaded before the first disconnect call. |
You are probably having another issue then. Perhaps in your case the reference value is not cached in the file. I'm okay with having a setting to determine if we should disconnect. Feel free to PR it |
Hi @patrickbrouwers, same issue of @eprop-aaron and @archy-bold here, is not related with #2392, I'm on the 3.1.18 release. Did you fix this? |
Nobody PR'd it yet |
I'm sorry, I'm new to all of this but it seems there hasn't been a commit to fix this. So I tried making one, here it is. |
@jpagarcia you can open a PR from that commit, I'll review it there. |
…lated values across sheets Fixes SpartnerNL#2951, SpartnerNL#2337, SpartnerNL#2392
…lated values across sheets Fixes SpartnerNL#2951, SpartnerNL#2337, SpartnerNL#2392
…lated values across sheets Fixes SpartnerNL#2951, SpartnerNL#2337, SpartnerNL#2392
Prerequisites
Versions
Description
When importing a spreadsheet and including the trait
WithCalculatedFormulas
, I get the following error when a cell with the formula=metadata!B10
(ie referencing another worksheet) is evaluated:The full stack trace is below.
From what I can tell, the formula can't be evaluated because the other sheet has been disconnected before the cell gets evaluated. I confirmed this suspicion by commenting out the code within
Sheet->disconnect()
, it worked after that.I presume the issue is that the importer is executed from another with the trait
WithMultipleSheets
and when moving onto the second sheet, it disconnects the first for performance reasons.Steps to Reproduce
Attached is an offending sheet, with the cell
tracks!G2
containing a formula referencing the first sheet.bundle-metadata-reference.xlsx
Expected behavior:
I expect the sheet to import.
Actual behavior:
Get an error.
Additional Information
Stack trace:
The text was updated successfully, but these errors were encountered: