question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

onVariable - access to cell position

See original GitHub issue

https://github.com/LesterLyu/fast-formula-parser/blob/master/grammar/hooks.js#L107

Right now, onVariable callbacks has access to variable name and sheet, but not the cell position.

Can i propose to change

const res = {ref: this.onVariable(name, this.position.sheet)};

to

const res = {ref: this.onVariable(name, this.position)};

The reason is that lets say i have a formula =sales * 10, in a table. For each onVariable call, i want to access the cell position and return the correct position of sales column.

Eg:

Sales total
11 =sales * 10
12 =sales * 10

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

0reactions
LesterLyucommented, Jan 31, 2021

Implemented in the v2 branch, position is now the second parameter.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Use Variable Row Number as Cell Reference in Excel
Method 1: INDIRECT Function to Enable Variable Row Number as Cell Reference · Method 2: Insert Variable Row Number as Cell Reference Using...
Read more >
How do I reference a cell in Excel through a variable and ...
I am working on a Macro in Excel that needs to iterate through an entire column and find clusters of non-zero data, add...
Read more >
How to use a Range or a Cell as a Variable in VBA
To use a range or a single cell as a variable, first, you need to declare that variable with the range data type....
Read more >
How to access/reference a Table cell or List element?
Solved: Say I have an Excel file with a variable number of rows, but the same number of columns. I need to extract...
Read more >
Access Data in Cell Array - MATLAB & Simulink - MathWorks
Access the contents of cells--the numbers, text, or other data within the cells--by indexing with curly braces. For example, to access the contents...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found