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

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

  • 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

  • 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 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处设置它们的路径.

  • LabVIEW for ARM 2009 Read from text file bug

    Hello,
    If you use the read from text file vi for reading text files from a sdcard there is a bug when you select the option "read lines"
    you cannot select how many lines you want to read, it always reads the whole file, which cause a memory fault if you read big files!
    I fixed this in the code (but the software doesn't recognize a EOF anymore..) in CCGByteStreamFileSupport.c
    at row 709 the memory is allocated but it tries to allocate to much (since u only want to read lines).
    looking at the codes it looks like it supposed to allocated 256 for a string:
    Boolean bReadEntireLine = (linemode && (cnt == 0)); 
    if(bReadEntireLine && !cnt) {
      cnt = BUFINCR;    //BUFINCR=256
    but cnt is never false since if you select read lines this is the size of the file!
    the variable linemode is also the size of the file.. STRANGE!
    my solution:
    Boolean bReadEntireLine = (linemode && (cnt > 0));  // ==
     if(bReadEntireLine) {    //if(bReadEntireLine && !cnt) {
      cnt = BUFINCR;
    and now the read line option does work, and reads one line until he sees CR or LF or if the count of 256 is done.
    maybe the code is good but the data link of the vi's to the variables may be not, (cnt and linemode are the size of the file!)
    count should be the number of lines, like chars in char mode.
    linemode should be 0 or 1.
    Hope someone can fix this in the new version!
    greets,
    Wouter
    Wouter.
    "LabVIEW for ARM guru and bug destroyer"

    I have another solution, the EOF works with this one.
    the cnt is the bytes that are not read yet, so the first time it tries to read (and allocate 4 MB).
    you only want to say that if it's in line mode and cnt > 256 (BUFINCR) cnt = BUFINCR
    the next time cnt is the value of the bytes that are not read yet, so the old value minus the line (until CR LF) or if cnt (256) is reached.
    with this solution the program does not try to allocate the whole file but for the max of 256.
    in CCGByteStreamFileSupprt.c row 705
     if(linemode && (cnt>BUFINCR)){
       cnt = BUFINCR;
    don't use the count input when using the vi in line mode. count does not make sense, cnt will be the total file size. also the output will be an array.
    linemode seems to be the value of the file size but I checked this and it is just 0 or 1, so this is good
    update: damn it doesn't work!
    Wouter.
    "LabVIEW for ARM guru and bug destroyer"

  • 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.

  • 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

  • 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

Maybe you are looking for

  • Issue in search detail view

    Hi, I have a issue in search screen. I developed a search screen with parameter. Based on the result, I am viewing the details of a selected record in a separate screen. The below steps I followed Step : 1      Search the record based on input parame

  • Web cam driver not found

    i have a hp pavillion dv6700 laptop,product no is KD311PA#ACJ.ITS WEB CAM IS NOT WORKING.i tried using youcam n lenovo web cam but no help.also the driver for this computer is also not displayed on your hp site. i'm currently using windows7 as os.

  • Remove an iPhone from my Apple ID?

    Hello there, I just bought an iPhone 4S and it's an amazing phone. Now I'm going to sell off my old 3GS so I was looking for to remove it from my Apple ID since I won't be the owner of it any longer. Where can I do this? It feels like I've checked ev

  • HELP , problems with iMac Aluminum

    Hi guys, My new iMac Aluminum arrived today..i live in Brazil (Amazonia) I bought it at Ann Arbor Apple Store (MI / USA), friend of mine bought it to me and sent via EXpress Mail When i try to turn on , i saw these pics .. http://img211.imageshack.us

  • Tuning SQL Query for base tables

    Hi, Can any please help me to tune the below query...... there is full table scan for po_action_history table SELECT DISTINCT      DECODE(hr.full_name,'Default Buyer, Purchasing','PCH', 'Default Buyer, Travel','TRV', 'Purchase Order, Rapid','RPO', 'D