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]: Error occurs if the formula contains a reference to a range that contains a reference to a range #1479

Open
bacek97 opened this issue Jan 12, 2025 · 2 comments
Labels
Bug Something isn't working Impact: Low

Comments

@bacek97
Copy link

bacek97 commented Jan 12, 2025

Description

Error occurs if the formula contains a reference to a range that contains a reference to a range
Error: Value of the formula cell is not computed.

// expected result in all cases: 1
const HyperFormula = require('hyperformula');

const options = {
  licenseKey: 'gpl-v3',
};

let hf = HyperFormula.HyperFormula.buildFromArray(
  [
    [
      1,
      // '=A1+0', // Success
      '=A:A+0', // BUG: Error: Value of the formula cell is not computed.
      '={B:B}',
    ],
  ],
  options
);

Video or screenshots

No response

Demo

https://stackblitz.com/edit/stackblitz-starters-ovw2zlhv?file=index.js

HyperFormula version

2.7.1 , 3.0.0 (develop)

Your framework

No response

Your environment

node v22.10.0 , v18.20.3

@AMBudnik
Copy link
Contributor

Thank you for sharing your feedback, @bacek97

At https://hyperformula.handsontable.com/guide/cell-references.html#relative-references you can find the list of supported references.

Zrzut ekranu 2025-01-15 o 13 03 22

The following reference pattern is not reported. I will recheck that with our developer, and if anything changes, I will update the thread.

@sequba sequba added Bug Something isn't working Impact: Low labels Jan 15, 2025
@sequba
Copy link
Contributor

sequba commented Jan 15, 2025

@bacek97 @AMBudnik

I verified that the issue is not caused by the format of the reference. The following example works correctly:

const HyperFormula = require('hyperformula');

const options = {
  licenseKey: 'gpl-v3',
};

let hf = HyperFormula.HyperFormula.buildFromArray(
  [[1, 1, 1, '=A1+0', '=B:B+0', '={C:C}']],
  options
);

console.log(hf.getAllSheetsValues());

It's related to the way these formulas depend on one another. Anyway, I confirm it's a bug and it will be added to our backlog.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Impact: Low
Projects
None yet
Development

No branches or pull requests

3 participants