ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Fill empty elements with zero in a String Array

Solved!
Go to solution

Hello, good night.

I´m stucked with this. I need to replace/fill all empty elements ina string array with zero´s.

My code is this but the result is not what I expected. Can someone give me some help ?

Thanks and best Regards,

 

Fill empty elements with zero in a String Array.png

0 Kudos
Message 1 of 5
(5,880 Views)
Solution
Accepted by antfar

Auto index the array in a for loop and check each element for empty string, replace with '0' and auto-index it back out.  Array to spreadsheet string.  Done.

aputman
0 Kudos
Message 2 of 5
(5,869 Views)
Solution
Accepted by antfar

Like this.

0 Kudos
Message 3 of 5
(5,861 Views)

Thank you very much for your help.

Nice 🙂

0 Kudos
Message 4 of 5
(5,852 Views)

Don't forget that we have this function. Less code. 😉

 

emptyToZero.png

0 Kudos
Message 5 of 5
(5,794 Views)