onVariable - access to cell position
See original GitHub issuehttps://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:
- Created 3 years ago
- Comments:9 (9 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
In Excel tables, it is supported
https://support.microsoft.com/en-us/office/using-structured-references-with-excel-tables-f5ed2452-2337-4f71-bed3-c8ae6d2b276e
Implemented in the v2 branch,
position
is now the second parameter.