-
Notifications
You must be signed in to change notification settings - Fork 67
[FIX] range: invalid sheet name with special character #7337
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
Conversation
If we have a range with an invalid sheet name, the sheet name is not escaped with quotes when it contains special characters when converting the range back to a string. Task: 5125762
| const cfs = data.sheets[1].conditionalFormats; | ||
| const rule1 = cfs[0].rule as ColorScaleRule; | ||
| expect(cfs[0].ranges).toEqual(["=sheetName_!A1:A2"]); | ||
| expect(cfs[0].ranges).toEqual(["'=sheetName_'!A1:A2"]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This whole test is both totally broken, and it highlight some problematic behaviors:
Broken because:
- in the spreadsheet data, it uses
figure.typeinstead offigure.tag. So Charts are never actually created. - it creates a sheet with invalid characters in its name such as
sheetName?, but the ranges of the charts/cfs are=sheetName!, an invalid sheet name that does not exist (notice the=, those are ranges and not formulas)
Strange behavior highlighted
- cfs formulas are stored as string in the plugin, and exported as it in the data. So they never go though the createRange/toRangeString moulinette. So sheet name with wrong character are never escaped.
Not sure if we want/need to fix that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rrahir didn't we talk about this test sometime ? I kinda remember something like that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do recall that as well, I think we agreed to fix it in later versions (specifically when it came to introduce the carousel but I might be wrong) I don't recall what we put in place though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LucasLefevre
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
robodoo r+
If we have a range with an invalid sheet name, the sheet name is not escaped with quotes when it contains special characters when converting the range back to a string. closes #7337 Task: 5125762 Signed-off-by: Lucas Lefèvre (lul) <[email protected]>

Description
If we have a range with an invalid sheet name, the sheet name is not escaped with quotes when it contains special characters when converting the range back to a string.
Task: 5125762
review checklist