LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

read from spreadsheet

As for now, I am reading the files in the folder I specify alphabetically because of the function List Folder. Is there any way that I can read all the text files in the folder I specify using the graylevel value that is stated in the text file regardless of what the files names the text files are being saved as? For example, all the textfiles data has one line that states the graylevel value. It ranges from 0-255. So the computer would know that it has to read the text file with the graylevel value of 0 first follow by the text file with the graylevel value of 15 then follow by the text file with the graylevel value of 30 and so on and so forth.

Download All
0 Kudos
Message 11 of 21
(193 Views)

Hi Fred,

 

"Is there any way"

Sure: Read all the files, parse the Graylevel, sort the files by their Graylevel-value, read again all the files...

Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
0 Kudos
Message 12 of 21
(191 Views)

Can u explain how to parse the Graylevel?

0 Kudos
Message 13 of 21
(188 Views)

Hi Fred,

 

do you read your own threads or did I wrote that message for nothing?

Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
0 Kudos
Message 14 of 21
(184 Views)

As for now, I tried using List Folder and Build Path to read all text files and store them in an array, then I tried to retrieve all the graylevels but as always, I can only retrieve the graylevel from the last text file that is passed through to the array. How do I retrieve all the graylevels from all the text files I have so that I can sort the files by the Graylevel-value? As from the sorting the files by the Graylevel-value, is it okay if I use the function Sort 1D array?

Download All
0 Kudos
Message 15 of 21
(173 Views)

Ignore the previous post. How do I sort the files by their Graylevel-value if I had successfully managed to parse the Graylevel from all the files that I have?

0 Kudos
Message 16 of 21
(164 Views)

Hi Fred,

 

you should try the well-known and often shown "Sort cluster array" trick Smiley Wink

check.png

Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
0 Kudos
Message 17 of 21
(159 Views)

How do you create the a.png, property node? invoke node? I totally don't understand what is property and invoke node.

0 Kudos
Message 18 of 21
(154 Views)

Hi Fred,

 

1) the picture is a snippet, you can directly put it in your block diagram...

2) there's no property node or invoke node

3) that's a simple unbundle cluster by name...

Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
0 Kudos
Message 19 of 21
(152 Views)

I am using labview 2009 and I seem to have a problem with snippet even if its from Labview 2009.

0 Kudos
Message 20 of 21
(150 Views)