LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Report generation, inserting Excel formulas

Solved!
Go to solution

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 

0 Kudos
Message 1 of 3
(2,896 Views)
Solution
Accepted by topic author GDthomas

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.

Formula using left cell.png

Bob Schor

 

Message 2 of 3
(2,839 Views)

BOb,

 

Thanks, that was agreat help in figuring out the solution. Also a good lesson in how these VIs work

0 Kudos
Message 3 of 3
(2,807 Views)