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

Worksheet reference #12

Closed
wojciechczerniak opened this issue Nov 16, 2019 · 7 comments
Closed

Worksheet reference #12

wojciechczerniak opened this issue Nov 16, 2019 · 7 comments
Labels
ODFF Conformance ODDF 1.3 Evaluator requirement ODFF SGE ODDF 1.3 Small Group Evaluator requirement ODFF Variances Implementation-defined, Unspecified, and Behavioral Changes
Milestone

Comments

@wojciechczerniak
Copy link
Contributor

wojciechczerniak commented Nov 16, 2019

Current notation is =$Sheet1.A1, while the more popular is using exclamation mark =Sheet1!A1 and does support spaces ='Sheet number two'!B4

We need:

  • test for spaces in the sheet name
  • test for special characters in the sheet name
  • configuration option for the separation dot/exclamation mark
This was referenced Nov 16, 2019
Closed
@swistak35 swistak35 self-assigned this Nov 22, 2019
@wojciechczerniak wojciechczerniak added this to the December 2019 milestone Nov 28, 2019
@wojciechczerniak
Copy link
Contributor Author

@jansiegel mentioned at the meeting that he had to remove underscore _ from Handsontable id. We need to check this and allow more characters.

@jansiegel
Copy link
Member

@jansiegel mentioned at the meeting that he had to remove underscore _ from Handsontable id. We need to check this and allow more characters.

Correct, also, when the name of the sheet contains a space, referencing it as ='Name with space'.A1 doesn't work, neither does =$'Name with space'.A1.

@wojciechczerniak wojciechczerniak mentioned this issue Dec 2, 2019
89 tasks
@swistak35
Copy link
Contributor

I've changed format from $Sheet42.A1 to Sheet42!A1; added support for _ character and added support for quoted sheet names ('Sheet with spaces'!A1).

Also, now I am not so sure, whether it's worth to pursue the support for other characters separating sheet name from the reference, because the tools supporting . notation, also have $ sign in the beginning. So it's not only that one character which changes...

There are few more tasks which may be worth adding:

  • other tools treat sheet names with case insensitivity (when adding and when fetching sheet. But we would still need to keep the original case-sensitive name, because when unparsing, we want probably show him shEET42, if he entered it this way)
  • there's no support yet for escaping characters, so there's no way to use Some'sheet sheet name. In other tools it's possible by escaping with '', so by writing Some''sheet.

This looks like topics which could be covered by standard. Does ODDF says something about that?

@swistak35
Copy link
Contributor

Closing the issue for now, as the things from the task are done, and my above comments can be extracted into different tasks.

@wojciechczerniak
Copy link
Contributor Author

I haven't seen spec about keeping the sheetName formatting. It looks like it's part of the formula general reference and should be normalized on save. This is what all tested by me spreadsheets do (XL, GS, LC). And after a while, I came to the conclusion that it makes a lot of sense, because what should we do on sheetRename action? Keep part of the formatting and change the rest? The name can be changed externally and is always overwritten fully.

TLDR; I think we should compare it as case-insensitive and display always as normalized to the name stored by the engine. Are helpers from #32 case-insensitive @swistak35 ?


There is a fragment about escaping characters. Like you said, by a double single quote:

SheetNames include single-quote“'” (APOSTROPHE, U+0027) characters by doubling them and having the entire name surrounded by single-quotes.

I will create a new task for this one 👍


The older draft for ODFF [1] explains why there is $ at the beginning of SheetName in some apps:

"OOo 2.0 always generates absolute Sheetnames if it's not the current sheet (i.e., '$' always prefixes a Sheetname). However, the OpenDocument 1.0 specification 8.3.1 clearly makes the "$" optional in front of a sheetname. "

And indeed the regex marks is as optional QuotedSheetName ::= '$'? SingleQuoted.
@swistak35 Maybe we can keep them in regex as well? Just mark them as optional 🤔

[1] https://www.oasis-open.org/committees/download.php/16826/openformula-spec-20060221.html

@swistak35
Copy link
Contributor

TLDR; I think we should compare it as case-insensitive and display always as normalized to the name stored by the engine. Are helpers from #32 case-insensitive @swistak35 ?

No, they are not -- we should have either case insensitivity in all places or not :) I mean, I agree with you, but the change is not only scoped to these two helpers -- we also need to change unparser to return correct name, etc. -- can you create a task for that as well? For case insensitivity?

Maybe we can keep them in regex as well?

Sounds doable

@wojciechczerniak wojciechczerniak added ODFF Conformance ODDF 1.3 Evaluator requirement ODFF SGE ODDF 1.3 Small Group Evaluator requirement ODFF Variances Implementation-defined, Unspecified, and Behavioral Changes labels Dec 6, 2019
@wojciechczerniak
Copy link
Contributor Author

All done.

Optional $ in sheet name: #65
Escaping apostrophe in sheet name: #64
Case sensitivity of sheet names: #66

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ODFF Conformance ODDF 1.3 Evaluator requirement ODFF SGE ODDF 1.3 Small Group Evaluator requirement ODFF Variances Implementation-defined, Unspecified, and Behavioral Changes
Projects
None yet
Development

No branches or pull requests

3 participants