LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Write NULL value in 2D array

Hi,

I use LabVIEW 6.1 for some speed measurements. Sometimes it happens that my software was not able to calculate a speed or it finds the found value not worth mentioning, and that is OK.

And after the measurements I write the results to Excel in a 2D array using DDE. But when there is no speed recorded Labview fills up the empty spaces with zero values. But I don't want that because it will affect my statistics like the mean.

Is there a way to write NULL (empty) values to excel instead of the 0?

Thanx in advance.

Illustration:

(x) (y) VALUE
1 2 23.5
2 3 45.78
3 4 <----- Here I don't want LabVIEW to put a zero (0) but an empty space.
4 5 12.23
0 Kudos
Message 1 of 4
(3,659 Views)
the excel example shipped with LabVIEW Write Table to XL.vi uses a 2D string array to write the matrix. If the string element is empty, it will leave the cell empty.
Stu
Stu
0 Kudos
Message 2 of 4
(3,659 Views)
That's right but that is a string array. When you use strings you can define "empty string" but this cannot be done with an integer or double array.

And that's what i want to learn.
0 Kudos
Message 3 of 4
(3,659 Views)
Excel does not support the concept of NaN so if you do not want to convert to string first, insert NaN yourself into your 2D array and modify the cell update to check for NaN and do not set the cell value if NaN
Stu
0 Kudos
Message 4 of 4
(3,659 Views)