From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Write to Spreadsheet

Hello,
I'd like write and read to the Spreadsheet .In my example Entrées Consignes.vi, I use the file Entrées Consignes2.txt for read and I must display the values in my front panel.I don't understand what I must do for resolve my problem because I don't do display the different values in my front panel .
When I use just the value in my file Entrées Consignes2.txt, it is correct , but when I have the name of value with the value, in my case I just need to read the data.The distance of the name and value is 34 characters in my case.
It is essentiel for me to give the different name to the différent values for my future application, when I'd like to read my file in the Excel.
Can you help me ?Thanks a lot.
0 Kudos
Message 1 of 4
(2,498 Views)
Your Extract data section does not work as I think you want. Not every line in the text file had a / character after the numbers. Also the string to number conversion functions will not ignore non-numeric characters before the numbers. I modified that portion of your VI. I search for line feeds and the = character, then strip whitespace (spaces, tabs, ...) befre converting to numbers.

Lynn
0 Kudos
Message 2 of 4
(2,479 Views)
Hello,
Thanks you for your helping, but I have somme question.
When I write in the Raw for example courant = 67 after I run the vi Extract data I see that this value 67 display in tne array2, and the same in the array.
When I write many values in the Raw, just the first value display in the Array2.Why?
My second question is, in my application, I'd like have an example what manipulate many Waveform Graph in the same vi, can you give me some example what I can see?
Thanks you very much,
0 Kudos
Message 3 of 4
(2,458 Views)
To answer your first question, the VI is looking for an "end of line" constant (ASCII 13) which it doesn't find, so it takes the entire text and places it into the first cell. The string to num VI takes only the first line. If you replace the constant with a line feed constant (ASCII 10) it should work.
About your second question, it depends what you mean by manipulate. If I understand you correctly, the best way would be to have one graph which displays a lot of data from different sources. If you search the example finder for "graph" you should find at least one which will show you how to do this.

___________________
Try to take over the world!
0 Kudos
Message 4 of 4
(2,435 Views)