04-12-2016 09:08 AM
Hello,
i'm using LV2015 with report generation toolkit...
i have written correctly an xlsx file...now i would insert some formulas in my file and I have tried to use "Excel insert formula" vi.
Problem 1 - using the formula COUNTA (=COUNTA(F2:F300)) i got no problem if written directly in excel...passing through labview instead i get #NAME? (i see the formula written correctly if i pass on in with my mouse)...if i refresh the cell (double click) i obtain the correct value.
There is a way to get directly the right value? i have many of this formula 😞
Problem 2 - if i use the formula COUNTIF i receive an error dialog (see attachment) and i can't create my xlsx file 😞
do you have any idea to solve my problems? 🙂
Many thanks to all,
Gianluca
04-12-2016 09:43 AM
Works for me in 2012.
04-12-2016 09:55 AM
@Gianluca1985 wrote:Hello,
i'm using LV2015 with report generation toolkit...
i have written correctly an xlsx file...now i would insert some formulas in my file and I have tried to use "Excel insert formula" vi.
Problem 1 - using the formula COUNTA (=COUNTA(F2:F300)) i got no problem if written directly in excel...passing through labview instead i get #NAME? (i see the formula written correctly if i pass on in with my mouse)...if i refresh the cell (double click) i obtain the correct value.
There is a way to get directly the right value? i have many of this formula 😞
Problem 2 - if i use the formula COUNTIF i receive an error dialog (see attachment) and i can't create my xlsx file 😞
do you have any idea to solve my problems? 🙂
Many thanks to all,
Gianluca
For problem #1, since you seems to be writing the formula after writing data to the xllsx file you need to recalculate the worksheet to update the values, insert the following code after Excel Insert Formula.vi.
For problem #2 please provide your vi with a typical xlsx file you are using. Are you using named range?
Ben64
04-12-2016 10:53 AM
I do not have to call the Calculate function if data is already present in the worksheet. It updates automatically. In Excel Options -> Formulas -> Workbook Calculation, this is set to Automatic. This is probably set to manual if you have to call the Calculate function after inserting the formula.
04-12-2016 11:25 AM
@aputman wrote:I do not have to call the Calculate function if data is already present in the worksheet. It updates automatically. In Excel Options -> Formulas -> Workbook Calculation, this is set to Automatic. This is probably set to manual if you have to call the Calculate function after inserting the formula.
I had some aftertoughts about this and it is possible that the calculate is required because the workbook has not been saved yet (I didn't try). We haven't seen the code so we can only guess.
Ben64
04-13-2016 02:21 AM
Solved...
it was just a formula language problem 😞 i use LV in english and excel in ITA 🙂