08-03-2015 11:29 AM
Hi everyone,
We just acquired the Report Generation Toolkit. I've got the basic report figured out but I'm stymied at inserting formulas where I need to. The report will have one row added when data is acquired. At that time I need to insert two formulas each referring to the cell immediately to the left of the cell it's in. I've found examples that put formulas at the end of the sheet but none that plugs them in as the data is being saved. Does anyone have an example of how this can be done?
Thanks
Solved! Go to Solution.
08-03-2015 10:21 PM
This snippet creates a report with the value 3 in a cell (as it turns out, it's cell A1). Note that because I'm using Excel Easy Table, I need to turn my scalar (3) into a 2D array. Easy Table gives me the cell address just to the right of the insertion (where the Formula will go -- by subtracting one from the Column, I can get back the Excel Address (A1) of the "cell to the left". I then create a formula (starting with "=") that doubles this cell and adds 0.5, then use Excel Insert Formula to put it into the Worksheet, where it becomes 6.5.
Bob Schor
08-04-2015 09:31 AM
BOb,
Thanks, that was agreat help in figuring out the solution. Also a good lesson in how these VIs work