xlsx-calc icon indicating copy to clipboard operation
xlsx-calc copied to clipboard

Cir Ref

Open sc-laurence opened this issue 5 years ago • 1 comments

Hi again thanks for your work and your help in advance.

I have the following Object

{ "B4": { "t": "s", "v": "A", "r": "<t>A</t>", "h": "A", "z": "General", "w": "A", "s": { "patternType": "none" } }, "C4": { "t": "n", "v": 1, "z": "General", "w": "1", "s": { "patternType": "none" } }, "D4": { "t": "n", "v": 2, "z": "General", "w": "2", "s": { "patternType": "none" } }, "E4": { "t": "n", "v": 3, "z": "General", "w": "3", "s": { "patternType": "none" } }, "G4": { "t": "n", "v": 0.05, "z": "0%", "s": { "patternType": "none" }, "w": "5%" }, "H4": { "t": "n", "v": 3.12, "f": "INDEX(B4:H4,4)", "z": "General", "s": { "patternType": "none" }, "w": "3.12" } } Change in G4 gives me circular ref error, but it works on Excel.

I think its because Range.js currently works with the ranges as if they are all related. But for certain lookup functions e.g. Vlookup, index, match... etc, its only ever ref to 1 cell and not the whole range.

Also just wondering, is there a way to determine the in str_2_val or other files to check the function first and returns a different Range Object ? The reason is because, if I have vlookup of a large range, creating the array (matrix) could take a long time. But for these look up functions, I do not need the whole range but just possiblly 2 columns or rows.

Thanks for your help.

sc-laurence avatar Feb 14 '20 05:02 sc-laurence

Check the master code plz

fabiooshiro avatar Jul 24 '22 14:07 fabiooshiro