Read from Spreadsheet File VI

Hello to everyone!
I want to read a spreadsheet file VI, wich contain many rows with this format:
0.475009,0.242797;
0.023044,0.522105;
0.735105,0.634358;
0.955100,0.982586;
etc..
The goal is to divide these rows into 2 array: the first one contains the left number:
0.475009
0.023044
0.735105
0.955100
while the right one contains the right number:
0.242797
0.522105
0.634358
0.982586
Someone can help me?
Thanks and
Best regards!

Hi GerdW.
The end of line delimiter is ;
with comma i separate two different measurements: the left numbers rapresent a current measure, while the right numbers a voltage measure.
I want to read my csv file, split the numbers into two different array, then plot the current and the voltage.
My start point is:
where all rows are like this:
i want to separate the left numbers and the right numbers into two array
Best regards

Similar Messages

  • Read From Spreadsheet File help

    I am saving all my data to a text file (See attached file). The problem is that when I try and use the Read From Spreadsheet File.vi I am unclear on how to make it show all my data.
    Does anyone know a away for me to read the whole file and display it all at once reather than line by line?
    Solved!
    Go to Solution.
    Attachments:
    test data 1.txt ‏6 KB

     The read from spread sheet Vi has two data outputs : the top right retrieves the whole file as a 2D array, if you leave the "number of rows" input on the left unwired.
    Message Edité par chilly charly le 01-07-2009 11:22 AM
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        

  • Read from spreadsheet file

    Hi! I am a beginner labview user and I have a problem reading data from a
    ..xls file. I have written in columns the data that i want to present in a
    waveform graph through labview. I give the path to the Read From Spreadsheet
    File tool and i connect a true constant in the "transpose" terminal. The Run
    button shows me no error but all I get in my waveform graph is a x-axis
    line. Could someone help me? Thanx

    You say that you want to read data from a .xls file. You use Read From Spreadsheet File to get the data into LV.
    You have mixed some things. A .xls file is NOT a spreadsheet file. It is a file which could be read by MS Excel and some other tools which have import filters for this file. Read from Spreadsheet File is not such a filter.
    A spreadsheet file in the context of LV is a text file where the cells of a row are separeted by a tab and the rows are separated by a end of line.
    A save thing is use Active-X automation to communicate with MS Excel. Let it load the file and read out the cells. The are examples in LV help and in the dev zone. You must have installed and licenced MS Ecxel on your target machine. Maybe someone has written such a fil
    ter for LV but I don't know it.
    The other way will only work if you use US local settings and the data is in one worksheet. Save the file with the extention .txt. So Excel will generate a text file of the correct format. Excel will use the regional settings of your machine. You can read in this file with Read From Spreadsheet File. Unfortunatly this will use fixed settings which are the same as for US regional settings.
    Waldemar
    Waldemar
    Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
    Don't forget to give Kudos to good answers and/or questions

  • 求助: 如何使用write to spreadsheet file.vi 和 read from spreadsheet file.vi, 并且如何定义它们的路径???

    请问如何使用write to spreadsheet file.vi 和 read from spreadsheet file.vi,我知道spreadsheet file.vi只支持.txt文件,但我应该在哪里设置它们的路径呢,请各位帮忙指点,能不能具体说明下,谢谢...

    write to spreadsheet file.vi 和 read from spreadsheet file.vi,支持.xls文件.
    可以在path处设置它们的路径.

  • EOF detection in "Read From Spreadsheet File"

    Hi folks, I need help in detecting EOF in a "Read From Spreadsheet File". I' d like to stop a while loop by wiring the EOF? indicator to the stop condition, but this doesn't work. For design resons I can't substitute the while loop with a for loop and I DO need the while loop. I read something about creating custom EOF detection but I'm wondering why the builtin function in the vi doesn' t work and if there isn't some simple solution. Many thanks, hazibuli  

    I'm guessing that you want to process one line at a time from the spreadsheet.  Use Read From Spreadsheet File to read in the entire spreadsheet as Dennis says.  Then wire the 2D output to a For Loop with indexing enabled.  Each iteration of the For Loop will allow you to process one line at a time.  When the last line is processed, the For Loop will exit automatically.  Here is an example to get string length of each element in a spreadsheet. Message Edited by tbob on 03-15-2010 09:46 AM

  • For Mike Porter: Read from Spreadsheet File.vi" function

    On 2/17/03 you answered my question about reading and viewing a test done last week back into Labview. I can open the "Read from Spreadsheet File.VI" in Labview and read the file "data.txt" into the VI. The data comes back into the rows & cells on the VI screen but I don't know how to open the graph to see the data as curves. I can see about a 3 x 4 array of cells at a time and the correct data is there but I want to plot it. Do I need to create a new block diagram and VI? I apologize for the vagueness of my question - I'm new at Labview.
    Attachments:
    DATA2.TXT ‏183 KB

    Create a VI with a Waveform Graph on the front panel. On the block diagram, insert a Read From Spreadsheet File function. Connect the All Rows output to the Waveform Graph.
    Attachments:
    Graph.jpg ‏3 KB

  • Format precision apparently ignored when using read from spreadsheet file

    I hope there is ridiculously simple solution to this problem but so far I can't find it. Using the Read from Spreadsheet File function in LabVIEW7.1, I can't get the floating point format (%f) to work; the decimal (%d) seems to work fine. For example, the first value in the attached file is 399.5853. When I read it in using %.2f format I would think I should get 399.58 but instead I get 399.58529663... Oddly if I use %d as the format, I get an as expected value of 399. Can anyone see what I am missing?
    Attachments:
    ReadFileTEST.vi ‏23 KB
    test.txt ‏1 KB

    The solution to the problem is the internal representation of floating point numbers: with a limited number of bytes only a limited number of the (infinitely many) real numbers can be represented. The nearest representable number to 399.5853 is 399.58529663 if the so-called single precision representation (abbr. SGL in Labview) is used.
    It seems that (ridiculously!) NI has chosen to use SGL as the data format in the Read from Spreadsheet VI which causes the unexpected behaviour you observed.
    You can change the representation from SGL (which uses 4 bytes) to DBL (double precision, using 8 bytes) in the Read from Spreadsheet VI and you will observe a better approximation then, but still not 'exact' since the number now reads 399.585300000000018. (With t
    he EXT representation, 10 bytes, you could go to even higher precision)
    I hope someone from NI reads this and they fix the unnecessary limitation of the precision in the Read from Spreadsheet VI.

  • Read From Spreadsheet File.vi in windows 7

    Hi,
    I use Read From Spreadsheet File.vi in windows 7 to read a table, but when it executes, i get a dialogue box asking for the filename, (The box is properly wired to the path).
    However, when i execute exactly the same programme in windows Xp it works with no problem.
    ¿Any known issues with this vi and xindows 7?
    I am using labview 8.6.
    Thanks for your help.

    I am using a relative path as shown in the figure, files are user1.xls user2.xls .... they all exist.
    I have build the program and instaled on other xp machine, it works. Then installed in a win 7 machine and is not working.
    Maybe there is a problem with ..\..\?
    Any other way to go to a parent folder not using ..\ ?
    Thanks for you help
    Attachments:
    ejemplo.JPG ‏8 KB

  • Read from spreadsheet file with multiple delimiters

    Is there a way to specify multiple delimitors in the read from spreadsheet file vi? I have a file that i need to read in that contains both space and comma delimitors and would like to read that data into an array using both delimitors (or not and). Below is the data I'm trying to read.
    ;attenuator data table
    att00:   db       000h,015h,017h,035h,03Ch,03Eh,03Eh,05Ch,05Eh,05Eh
    att10:   db       07Ch,07Eh,07Fh,09Dh,09Fh,09Fh,0BDh,015h,017h,035h
    att20:   db       03Eh,03Eh,05Ch,05Ch,05Eh,07Ch,07Ch,07Eh,09Dh,09Dh
    att30:   db       09Fh,0BDh,000h,000h,000h,002h,002h,002h,002h,003h
    att40:   db       021h,021h,021h,021h,021h,023h,023h,023h,023h,023h
    att50:   db       041h,041h,048h,048h,048h,04Ah,04Ah,04Ah,04Ah,068h
    att60:   db       068h,068h,068h,068h,068h,06Ah,06Bh,06Bh,06Bh,089h
    att70:   db       089h,089h,089h,08Bh,08Bh,08Bh,08Bh,0A9h,0A9h,0A9h
    att80:   db       0A4h,0A6h,0A6h,0A6h,0A6h,0C4h,0C4h,0C4h,0C4h,0C6h
    att90:   db       0C6h,0C6h,0C6h,0E4h,0E4h,0E5h,0E5h,0E7h,0E7h,0E7h
        END
    I'm looking to just read in the data adjust the hex values and then save the data in the exact form which I read it in. If read from spreadsheet file can not recognize multiple delimiters that is all I need to know. I do not want to spend time reading it in using a single delimitor and doing a bunch of string manipulation. I'm also working with LabView 8.5 if that makes a difference.

    You should use "scan string for tokens", and wire an array of delimiters.
    One nice behavior is the fact that consecutive delimiters are contracted into one (by default), so e.g. if your delimiters is an array containing a space and a comma, a sequence of three spaces and a comma would still count as one delimiter.
    For some ideas, have a look at my old example here:
    http://forums.ni.com/ni/board/message?board.id=170&message.id=192847#M192847
    LabVIEW Champion . Do more with less code and in less time .

  • Is there a file size limit when using Read From Spreadsheet File?

    I'm trying to read in a large file, about 52mb, 525600 lines with 27 fileds in each line using "Read From SpreadsheetFile.vi". I then search the 2D array for -999, which represents bad/no data in that field and total the number of fields with -999 in it. This all works on 3 months worth of data. The program is giving me an out of memory error and stopping in the case where the read takes place on the large one year file. So my question is does the Read from Spreadsheet file have size limitations? Is there a better way to do this? Thanks in advance for the help.
    ssmith
    Solved!
    Go to Solution.

    Camerond--
           Thanks for the help. I recreated the VI you posted and unfortunately it doesnt work. It looks like the index array vi is only looking at the zero index and not the other 26 fields in each row. This would probably require a FOR LOOP to go through each field index. This is what I have and it works on a smaller version of the file. For some reason LV is using up bucket loads of memory to run this smaller file and crashes running the 60MB file. I've attached one of my vi's to solve this problem and the smaller data set. You'll see in the beginning that I trim some columns and rows to leave just the data I want to scan. Thanks again for the help.
        I just tried send 3 months worth of one minute data and it failed. So here is a really small version, 20 minutes worth of data. Does anyone see anything that would cause memory usage issues here?
    ssmith
    Attachments:
    Find-999NoLoops.vi ‏17 KB
    TEST2MET.txt ‏3 KB

  • Write/read from spreadsheet file

    How to write and read bach 2D array from spreadsheet file?

    The Write to Spreadsheet File.vi and the Read to Spreadsheet File.vi that ship with Labview are fairly self-explanatory - also check the File I/O examples included with Labview.

  • Problem using read from spreadsheet file and polar plotting

    Hi to all labview users,
    i am a beginner in labview and i am trying to do a polar plot.
    i read the polar plotting example in labview and it was straightforward.
    I used "write to spreadsheet file" to gather data.
    and they are in the following format
    13  10
    4  20
    8 30
    ....etc
    now. i tried using "read from spreadfile" to get the data into a array, then using "array to cluster" to convert the array into cluster, so i could connect it to the polar plot block
    however, it kept saying i couldnt connect that way, because polar plot uses 1-d array with cluster of 2 element and my source is a cluster of 9 elements....
    but doesnt the "read from spreadfile" block give me a 1-d array? and where does that 9 come from? i only have 3 rows and 2 columns in my data file....
    any guidance would be greatly appreciated.
    thx alot
    Happy guy
    ~ currently final year undergraduate in Electrical Engr. Graduating soon! Yes!
    ~ currently looking for jobs : any position related to engineering, labview, programming, tech support would be great.
    ~ humber learner of LabVIEW lvl: beginner-intermediate

    Helllo,
    I've made an example to try to help you  with that question.
    Notes:
     - the file must have values separeted by tab
     - reading the values from file as you mentioned using "read from spreadfile" you'll get a 2D array and not 1D;
    Software developer
    www.mcm-electronics.com
    PS: Don't forget to rate a good anwser ; )
    Currently using Labview 2011
    PORTUGAL
    Attachments:
    Read Table and plot polar graph.vi ‏26 KB
    teste.txt ‏1 KB

  • 求助: 还是一个如何使用write to spreadsheet file.vi 和 read from spreadsheet file.vi, 并且如何定义它们的路径的问题???

    在定义路径时有两个路径框,一个是FILE PATH,另一个是NEW FILE PATH,请问我应该定义哪个呢???定义好后就可以直接往spreadsheet file.vi中存储和读取记录了吗???还需要再做任何其它的工作吗???谢谢...

    定义file path就可以了,new file path 是这个VI的输出

  • Read from spreadsheet: a way to automatically continue if the file is missing? (Rather than having to push "continue")

    Hi,
    I'm using the "read from spreadsheet file.vi" to read in data from a file that may or may not be present.  The data isn't required - it's optional data; nice to have but not everybody will use it.
    Of course, if the file isn't present, I get an "Error 7 occurred at Open File+.vipen File", and I have the choice of pushing either the "Continue" or "Stop" button.   What I'm wondering is:  is there a way to just have LabVIEW automatically continue if the file is missing?  Perhaps it could alert the user to the missing file, but continue anyway?   Normally I'd handle this by wiring the Error output of the function to an error indicator.  But the "read from spreadsheet file.vi" function doesn't appear to have an error output.
    I think my description of my question is sufficient, but I'm attaching a snippet of my LabVIEW code that shows the read from spreadsheet file function in question, and the error I get when the file is missing.
    Thanks,
    dan
    Solved!
    Go to Solution.
    Attachments:
    labview-read-sprdsht-error.png ‏27 KB

    Dan_the_Clam wrote:
    Why oh why do people hate them so much!  I'm a friend of local variables! 
    1. They use more memory
    2. They require something on the front panel (even if hidden).  So that is yet another copy of your data
    3. They break data flow
    4. RACE CONDITIONS!!!
    Dan_the_Clam wrote:
    my code evolves and tends to sprawl a bit.
    That tells me you do not have a good architecture to begin with.  It also tells me you need to modularize your code more and use subVIs.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Read From Measurement File... removes X Values of first column?

    During one of our tests, two instruments were switched at the terminal by accident. I need to read in the massive lvm files, remove the wrong scaling and apply the correct scaling, while switching the values in the columns and right it all to new files. Simple right?
    I wanted to use the Read from Measurement File.vi to make things easier, because the files are very large and I would like to analyze them 100 rows at a time. Some of the the files are around 1.5 Gigs in size so I need to read them in chunks.
    The read from measurement file keeps removing the first column from the data! It outputs the data as a signal (dynamic data) and I have to use the dynamic to numeric array express vi. For some reason, before I even get to that point, the first column is not in the data.
    No matter what settings I pick on the read from measurement express vi, the time column is removed from the data. I have checked/unchecked the "first row is channel names" and "first column is time channel" to no avail. The odd thing is that in the preview it shows the first column, as if it will read it properly... but it doesnt. Nothing I change in the settings can seems to make a difference in getting the first column, the x values, out of the file.
    Below you can see the first column completely removed from the data.
    This is extremely frustrating. By probing the signal out I can see the dynamic data attributes and the time column has already been removed, so I don't think that the signal to double array express vi is the problem, but I am not sure.
    I am attaching my VI and a small data file to be analyzed. You can see what I mean.
    The alternatives seem less than adequate. The read from spreadsheet file vi wants an offset of a specific number of characters not rows. The problem is that this is not constant between rows for some reason, when hidden characters are taken into account so I cant just set the number of characters in 100 rows and increment the offset in a loop... like I normally would. That means I might miss data or get a corrupted row.
    This means that I have to use the read from text file, read how ever many characters I think a row is (over estimating a bit) then search for the newline character, find out how many chars are in that set and then offset that for the next loop iteration, all while converting each string number to a double. Talk about slow.
    I have searched around and found that I am not the only one that has had this issue. This is a common thing, but no one seems to have the answer. Why can't the read from measurement file VI read all of the numbers in every row? Why cant I tell it I want a 2d array of doubles out and not a dynamic data type? It has to be something I am doing wrong.
    Attached is a zip file with my VI and two data files. The "S19_A_DSI_detensioning_c.lvm" is the one generated by my VI (_c meaning corrected). "S19_A_DSI_detensioning.lvm" is the original measurement file. I hope you will pardon my messy VI, it's a quicky.
    Any help you guys can give would be much appreciated.
    [will work for kudos]
    Attachments:
    Scaling Factor Correction.zip ‏1109 KB

    That is a great workaround. The help talked about putting a check next to "read lines" but for the life of me I couldn't find where to do that. I wonder what other VIs have mystery check options in the right mouse click menu. I mean normally options like those are inputs, I thought. I'm going to start right clicking on every VI I drop to see if there are options there I never realized.
    I would still have to use the set file position VI and specify the byte offset right? How would I know where that is? I guess each character is a byte and I would count the characters in the string retrieved and then offset by that amount on the next iteration using a shift register?
    While waiting for help, I ended up using the read from text file and using the match string to look for the new line character, and using the spreadsheet string to array vi, analyzed the files line by line. Thats just because I couldn't easily come up with a regular expression to get 100 lines. It was slow but it worked.
    However, that still really doesn't answer the question of why it is impossible to get the first column with the read from measurement file express VI. Does anyone know? Is this a known bug?
    [will work for kudos]

Maybe you are looking for

  • Unable to run a report as an Applet Getting error

    Crystal Report Server  8.5 version using "JavaPluginViewer.asp"  from ASP file. Here is the log on  Java Console. Java Plug-in 1.6.0_16 Using JRE version 1.6.0_16-b01 Java HotSpot(TM) Client VM User home directory = C:\Users\xxxxxxx network: Loading

  • In a big trouble(offset issue)

    Hi gurus, while upgrading from 4.6c to 6.0 i am gettin this error. please help me in reolving this offset issue thanks in advance. error : "RM11P" and "WA+49(719)" are not mutually convertible in a Unicode          program . . . . .           line in

  • JBO-25006

    Hi all, When I'm inserting rows into Table, it throws error JBO-25006-Out of Index exception, I'm inserting the row in advanced table and I need to add multiple rows at a time.

  • Transfer settings from CS6 to CC

    Hey everyone, Just wondering if there was an easy way to transfer all my effects, settings and plugins from CS6 to CC. I have an 27in iMac (just to give you an idea of what my operating system is). I want to transfer all my settins from CS6 to CC but

  • Can anyone help me with using an iPhone in Canada?

    Hi My son is in British Columbia, Canada playing hockey for several months. Specifically 5 hours North of Vancouver. Small town. (We are from the USA) Only wireless store there is Telus. He went in yesterday to buy an iphone...we've been round and ro