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

[Bug]: IF formula error #1497

Open
luotaox opened this issue Feb 20, 2025 · 3 comments
Open

[Bug]: IF formula error #1497

luotaox opened this issue Feb 20, 2025 · 3 comments
Labels
Bug Something isn't working Docs Improvements or additions to documentation

Comments

@luotaox
Copy link

luotaox commented Feb 20, 2025

Description

Description

In Vue3 by setCellContents set=IF(Sheet2!B1>1, “true”, “false”) the following exception is reported Uncaught TypeError: Cannot read properties of undefined (reading ' licenseKeyValidityState')
But under Nodejs it works fine

Video or screenshots

Image

Demo

https://stackblitz.com/edit/vitejs-vite-e4bvdm7a?file=src%2FApp.vue

HyperFormula version

v3.0.0

Your framework

Vue3

Your environment

windows edge

@AMBudnik
Copy link
Contributor

AMBudnik commented Mar 5, 2025

Thank you for sharing the issue result. I was able to replicable the error response, and while we keep executing the same method over and over, we get an additional error

vue.js?v=95fbf505:2334 Uncaught Error: Value of the formula cell is not computed.
    at Proxy.getCellValue (hyperformula.js?v=49c994f8:11765:13)
    at Proxy.getCellValue (hyperformula.js?v=49c994f8:11210:21)
    at Proxy.getScalarValue (hyperformula.js?v=49c994f8:13314:39)
    at Proxy.getCellValue (hyperformula.js?v=49c994f8:21747:59)
    at hyperformula.js?v=49c994f8:21753:57
    at Proxy.genericSheetGetter (hyperformula.js?v=49c994f8:21766:21)
    at Proxy.getSheetValues (hyperformula.js?v=49c994f8:21753:17)
    at hyperformula.js?v=49c994f8:21797:54
    at Proxy.genericAllSheetsGetter (hyperformula.js?v=49c994f8:21789:27)
    at Proxy.getAllSheetsValues (hyperformula.js?v=49c994f8:21797:17)

I haven't been able to identify the reason behind it yet, but as the syntax is correct, I believe we can call it a bug. I will update the thread with any new findings.

@AMBudnik AMBudnik added the Bug Something isn't working label Mar 5, 2025
@luotaox
Copy link
Author

luotaox commented Mar 5, 2025

I think I found the problem, using ref in Vue3 turns it into a responsive object. This operation may affect the original object, the correct operation is to not use or use reactive, if you must use ref you can use toRaw wrapping, this error may not only occur in setting formulas. Maybe you guys can mark the docs
This is the demo link https://stackblitz.com/edit/vitejs-vite-mwacnqr2?file=src%2FApp.vue

@AMBudnik
Copy link
Contributor

AMBudnik commented Mar 5, 2025

Thank you for additional research.

@AMBudnik AMBudnik added the Docs Improvements or additions to documentation label Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Docs Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants