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.
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.
10-26-2015 08:59 PM
Hi everyone , thanks for your time .
I have saved in a file data like this :
name address phone e-mail , etc
Each field separated with a tab (\t) delimiter .
I read each line of the file with read text file function and checking read lines , then use index string array , the result is : each while iteration i can get the complete line of text (string) , i want to convert this string with tab separated fields into a string array .
Example :
input string (name address phone e-mail)
output array of string elements : name
address
phone
Thank you all , i will appreciate any help .
Solved! Go to Solution.
10-26-2015 09:18 PM
Tab-separated files are precisely the default file type of LabVIEW's Read/Write Spreadsheet (or Read/Write Delimited) File functions. They can also read comma-separated Variable (.csv) files, which some mistakenly call "Excel" files.
If you use this Read function, you will create a 2D array, where each row corresponds to a line of your file, and each column to a tab-separated entry. Note that since this is a 2D array, each "row" needs to have the same number of "columns", but it sounds like your data may fit this well.
If you need everything as one long array, use the Reshape Array function.
Bob Schor
10-26-2015 09:32 PM
thanks for your time friend .
Here it is what i tried to accomplish , but i can't change the data type from double to string , do you know how can i do this ?
thank you very much for your help i really appreciate that .
10-26-2015 09:37 PM
10-26-2015 09:42 PM
10-26-2015 09:43 PM
10-26-2015 10:04 PM
get an array constant and create an array of string then you can change your output data type.
10-26-2015 10:09 PM
it worked like a charm , thank you very much !!
10-26-2015 10:10 PM
Once you have a String Array (the first step in your code), simply wire the Array into the Write Spreadsheet File function! Don't make things more complicated than they need to be.
How much time/classes/tutorials have you invested in learning LabVIEW? If you are doing it "on your own", you really should do as many of the Tutorials mentioned in the upper right corner of the Forum as you can. It won't take but a few hours, and will give you a reasonable background and introduction to many aspects of LabVIEW.
Bob Schor