gdemin/excel.link

Error when referring to cell by object, not directly naming cell

Closed this issue · 2 comments

I'm trying out excel.link and it has the functionality I need when I'm directly referring to a cell via the command line or a script, eg xlrc[h4] <- 500 sets cell H4 to 500 (I just switch over to Excel and check). This works, but if I try to set the cell as an object (eg k <- 'H4' ) then refer to that object xlrc[k] <- 500 , I get Error: Exception Returned. I'm trying out excel.link because I need to be able to do what-if scenarios on a spreadsheet with thousands of iterations, so I need to be able to not hand-type in cell references every time! Where did I go wrong?

When you want to use range in the variable you need to use double bracket notation:

xlrc[[k]] <- 500