02-26-2019 07:45 AM
Hello,
I'd like to open an Excel file and I need to read a particular cell where there is a formula. I mean, suppose that:
- in A3 cell there is =A1+A2;
- in A1 cell there is 1;
- in A2 there is 5
if I read A3 with the Excel Get Data.vi I recieve 6, but I'd like to read =A1+A2.
How can I do?
thanks,
Fabio
Solved! Go to Solution.
02-26-2019 08:42 AM
@fabio.int wrote:
Hello,
I'd like to open an Excel file and I need to read a particular cell where there is a formula. I mean, suppose that:
- in A3 cell there is =A1+A2;
- in A1 cell there is 1;
- in A2 there is 5
if I read A3 with the Excel Get Data.vi I recieve 6, but I'd like to read =A1+A2.
How can I do?
thanks,
Fabio
At the Blockdiagram of "Excel get Data.vi", there's this (ActiveX) property node set to "value2"
In the menu of this specific property node there's also the property "formula"
This looks like it is possible to do what you want to achieve, but I would not want to re-write or modify the Report Generation Toolkit.
I'd start here:
http://www.ni.com/example/28409/en/
02-26-2019 09:14 AM
Create a subVI that takes a worksheet reference and an excel location as input, use the function Excel Get Range to return a range reference and from there, you can get the formula as output.
02-16-2024 01:29 AM
I'm basically reading formula from the excel sheet using vi (i have attached below/ the method u suggested). For few excel sheets values are updating, where as other sheets values aren't updating. Tired saving excel input sheet in both xls and xlsx format but didnt work. what might be the issue.
02-19-2024 09:17 AM
Since you didn't share a spreadsheet file, it's difficult to say what is wrong without simply guessing.
It looks like you have spent a lot of time reinventing the wheel, making VI's for functions that already exist.
Excel Workbook Properties - returns the numbers of sheets in the workbook
Excel Get/Set Excel Location - converts to/from cell name from a row/column pair.