-
Notifications
You must be signed in to change notification settings - Fork 108
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
Percent/Currency value types are incorrect #686
Comments
I am unable to reproduce this behaviour. Following code passes all tests for me:
|
@izulin thanks for replying/investigating so fast. That's strange, I'll look into it and see what's happening and get back here soon |
@MartinDawson two random things to check:
|
I’ll check when I’m back home later exact my but the config I was using was
just the default, ie no config so should be fine
I’ll check Unicode chars are correct too, good idea
Thanks
…On Sun, 6 Jun 2021 at 11:30, Przemysław Uznański ***@***.***> wrote:
@MartinDawson <https://github.com/MartinDawson> two random things to
check:
-
is the '$' and '%' sign actual dollar and percent (there might be some
unicode weirdness of other characters looking similarly)
-
what are the engine options? you can get them with .getConfig() method
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#686 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADSVRWZPDFMX3TVPIZ7A7RTTRNE4XANCNFSM46EKGIYQ>
.
|
Trying to run the code from those unit tests might also help us debug it: hyperformula/test/CellContentParser.spec.ts Line 136 in 43071aa
hyperformula/test/CellContentParser.spec.ts Line 154 in 43071aa
|
Thanks for the link, I was actually looking for that :)
I’ll run those and see what I did wrong
…On Mon, 7 Jun 2021 at 20:19, Przemysław Uznański ***@***.***> wrote:
Trying to run the code from those unit tests might also help us debug it:
https://github.com/handsontable/hyperformula/blob/43071aa2a822ddcea04a7b1016fa3e8dda78e751/test/CellContentParser.spec.ts#L136
https://github.com/handsontable/hyperformula/blob/43071aa2a822ddcea04a7b1016fa3e8dda78e751/test/CellContentParser.spec.ts#L154
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#686 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADSVRW3VKN35CUFCZQUONHTTRULS3ANCNFSM46EKGIYQ>
.
|
@izulin I tried running the unit tests and it worked fine for me on 14.x However I tried in code sandbox and it doesn't work. I think the issue is failing in js browser environments and working in nodejs. See here please: https://codesandbox.io/s/quizzical-cache-6gbj8?file=/src/index.js And observe the console. |
Here's my config:
|
The problem lies in the code relating to matrix detection, which is being phased out anyway. In fact, this problem is not related to specific browser setting (which I am truly grateful for :) )
on e.g. |
(or you can switch to |
@izulin Turning off matrixDetection works so I'll do that for now. Thank you |
Happy to help! |
(This should be closed when we release new version.) |
Closing as done |
Actual:
1%
&1$
results in a valueType ofNUMBER
and a valueDetailedType of NUMBER_RAW.Expected:
1%
&1$
should result in a valueType ofNUMBER_PERCENT
andNUMBER_CURRENCY
.Because the format is wrong if you then try and do getCellValue on it it will produce a NaN value. This means I cannot use
getAllSheetsSerializedValues()
and use that to build another sheet because it produces NaN results.Steps to reproduce
Simple follow this steps here: https://handsontable.github.io/hyperformula/api/classes/hyperformula.html#getcellvaluedetailedtype
Here's my testing showing the bad results:
The text was updated successfully, but these errors were encountered: