How can I convert 400 data points from a spreadsheet file to an array?

The spreadsheet file contains over 5000 data points (in one column) of which I only want the first 400 and want to convert them to an array in Labview. I tried to use the 'readfromspreadsheet' vi but it wasn't much help. Please tell me how i should approach this problem and what vi's to use.

I attach a model vi that you can experiment with. You will need to know the formatting of the data in your file, from there -plus the delimiter- you'll be able to estimate how many characters makes the first 400 data point. It's possible to develop a more robust vi to do this, in the mean time, the attached vi can quickly give some answer.
Attachments:
model.vi ‏28 KB

Similar Messages

  • How can I extract a dates column from an ascii file

    I am extracting data from an ascii file and the rest of the data is extracted using read from spreadsheet, but the date appears as just the day e.g. 22 for 22nd, how can I get the date, format in ascii is e.g 22/04/2006, can I do this by specifying something at format of read from spreadsheet ? Cheers
    Emily

    Hi,
    I found the other day that there are instructions included inside the Read From Spreadsheet vi on how to modify it slightly to read strings rather than doubles.
    If you drop the Read From Spreadsheet  vi onto the block diagram and double click on it, you will open the front panel for the vi. If you then select the block diagram (for Read From Spreadsheet) you will see an 'instructions' frame below the main 'code', and the 3rd paragraph tells you how to modify the VI to read the spreadsheet as a set of strings rather then doubles. Save the vi as a new filename when you've edited it or you will overwrite the existing vi!
    Using the newly modified vi you can read in your entire spreadsheet, extract the dates as strings, then do any conversion necessary to the other columns of the sheet to change them into the types of value you require (eg doubles).
    I hope this helps.
    Mark
    Applications Engineer
    National Instruments

  • How can I convert these 250 data points in a spreadsheet file into an array???!!!

    I want to convert these points(see spreadsheet file attached) into a 1-D array of numbers and plot them using a vi. I am using the readfromspreadsheet.vi and it just gives me a number 4 and plots that. Please tell me what to do...I'm confused and have a project due!!!
    Attachments:
    ec1.xls ‏14 KB
    test.vi ‏14 KB

    Save the excel spreadsheet as tab delimited text file and use "Read From Spreadsheet File" vi to read it.

  • How to get the last data point from a TDM file in LabVIEW?

    Hello,
    I am using LabVIEW to analyze some rather large TDM files, and I need a way to get only the last data point.  So far, the only way I have been able to accomplish this is by reading the entire file.  Is there a property in the TDM file or a function in LabVIEW that will allow me to get the index of the last item in a channel?  
    Thanks!
    Christina

    Do you want to avoid reading whole file and want to be able to reach or get the index of last value of channel? is there any specific reason? I am not sure you could do it without loading the whole file. But the easiest way would be just to use array functions "array size" would give you the index of last element. 
    -Nilesh
    Kudos are (always) welcome for the good post. :-)

  • How can i convert the data from mutiple-table to the other database(MSSQL)?

    Dears,
    How can i convert the data from mutiple-table to the other database such as MS-SQL?
    I have a third party system based on MS-SQL 2000.
    Now we want to make a integration between SAP R/3(Oracle) and SQL server.
    When my user releases the purchase order in R/3, the application we coded will convert the releated data to the temp database on the SQL server.
    But i don't know which tools will help me reach the purpose.  BAPI, LSMW, IDoc... ???
    Would anybody tell me which way is better and how to do?
    Thanks a lot!
    Kevin Wang

    Hello Kevin,
    The question to use which method depend on your detail requirements. If you use BAPI, you need to find which Bapi can provide the data you want. Bapi normally use as a function called by external system. So you need to develop an external program like VB/Java to call this Bapi and move it to SQL. LSMW is use when you want to upload data from an external system to SAP. So it does not serve your requirement. Idoc can be use to export data to an external system. Again like Bapi, you need to find what Idoc can provide the data you want. However, it does not any programming from the external system. If I were you, based on your requirements, I think writing an Abap program that read the data you want and download it to NT/SQL server will be faster and easier.

  • How can I get the data back from my game

    How can I get the data back from minecraft if I deleted the app and bought with a different Apple ID

    No, they are tied to the ID that purchased them, and cannot be transferred to anyone else.

  • How can i get the all values from the Property file to Hashtable?

    how can i get the all values from the Property file to Hashtable?
    ok,consider my property file name is pro.PROPERTIES
    and it contain
    8326=sun developer
    4306=sun java developer
    3943=java developer
    how can i get the all keys & values from the pro.PROPERTIES to hashtable
    plz help guys..............

    The Properties class is already a subclass of Hashtable. So if you have a Properties object, you already have a Hashtable. So all you need to do is the first part of that:Properties props = new Properties();
    InputStream is = new FileInputStream("tivoli.properties");
    props.load(is);

  • How can I convert the volume directory into a single file installer?

    How can I convert the volume directory into a single file installer? I would like to hide all the miscillaneous files that I don't care for and be able to have the installer double click a single file and have it automatically install.

    On the second prompt screen when prompted 'What kind of self-extracting Zip file file do you want to make?'
    Are you choosing the second option (self-extracting Zip file for software installation)?
    I have a word file that I created to help me remember - is there anyway to email it to you?

  • How can I convert output data (string?) from GPIB-read to an 1D array?

    Hello all,
    I am reading a displayed waveform from my Tektronix Oscilloscope (TDS3032) via the GPIB Read VI. The format of the waveform data is: positive integer data-point representation with the most significant byte transferred first (2 bytes per data point).
    The output data of GPIB-Read looks like a string(?) where the integer numbers and a sign like the euro-currency sign are seperated by spaces e.g. #5200004C3 4 4 4 4 3C3C3........ (C represents the euro-currency sign).
    How can I convert this waveform data into a 1D/2D array of real double floatingpoint numbers (DBL) so I can handle the waveform data for data-analysis?
    It would be very nice if someone know the solution for this.
    t
    hanks

    Hi,
    First of all, I'm assuming you are using LabVIEW.
    The first you need to do is parse the string returned by the instrument. In this case you need to search for the known symbols in the string (like the euro sign) and chop the string to get the numeric strings. Here are some examples on parsing from www.ni.com:
    Keyword Search: parsing
    Once you parse the numeric strings you can use the "String/number conversion VIs" in the String pallette.
    Hope this helps.
    DiegoF.Message Edited by Molly K on 02-18-2005 11:01 PM

  • How can i convert this data(00000000) into date format(yyyy-MM-dd)

    Hi,
    i am using this method to convert date format from string.
    public static string FormatDate(string inputDate, string inputFormat)
                System.DateTime date = DateTime.ParseExact(inputDate, inputFormat, null);
                string datepresent = DateTime.Now.Date.ToString("yyyy-MM-dd");
                return datepresent;
    its working properly,
    but when input data is like 00000000 i am getting error this is not valid.
    how can i convert this into date format any help..!

    Have you tried the above code:
    I can see it is working with both Date and DateTime destination nodes.
    Map:
    Functoid Parameters:
    Functoid Script:
    public static string FormatDate(string inputDate, string inputFormat)
    string datepresent;
    if (inputDate == "00000000")
    datepresent = "0000-00-00";
    else
    System.DateTime date = DateTime.ParseExact(inputDate, inputFormat, null);
    datepresent = date.ToString("yyyy-MM-dd");
    return datepresent;
    Input:
    <ns0:InputDateString xmlns:ns0="http://DateFormat.SourceSchema">
    <DateString>00000000</DateString>
    </ns0:InputDateString>
    Output:
    <ns0:OutputDate xmlns:ns0="http://DateFormat.DestinationSchema">
    <Date>0000-00-00</Date>
    </ns0:OutputDate>
    If this answers your question please mark as answer. If this post is helpful, please vote as helpful.

  • How can i convert a data file to mp3 so it can be played ?

    HOW CAN I CONVERT DATA FILE TO MP3

    You cant change a file on a CD/DVD.
    You need to import the contents to iTunes. You can choose the file format to save it as in iTunes Preferences.
    From the menu bar (with iTunes open)
    iTunes > Preferences > General - click the Import Settings button and change the choice to mp3 encoder.
    (Note - that instruction is for iTunes 9.1.1 - if it's changed in 10.x, I trust Klaus or one of the others will correct me).
    When you've set the import encoding, put your CD in and select import (button at bottom right in 9.1, may be in the menu bar for 10.x).

  • How can I convert a Database Handle from TestStand to LabVIEW?

    I want to use a Database Handle (already created in TestStand by an Open Database step) in a LabVIEW-VI (called from TestStand) to connect it with the "Connection Reference" input of the "Easy SQL.vi"? If I use a directly connection via the "TestStand - Get Property Value (Number).vi" I get back the error message 4101 in LabVIEW. How can I convert the Database Handle?
    Test Engineering
    digades GmbH
    www.digades.com

    The TestStand database step types use the CVI SQL Toolkit to talk to databases. The handle that you are referencing is an internal memory location and not a actual handle that you can directly use. Currently as implemented the handle that is stored in a numeric TestStand property for the connection and the SQL statement are the handle values returned from the CVI SQL Toolkit. So for the connection handle, you could call the CVI SQL Toolkit function
    DBGetConnectionAttribute (
    int Connection_Handle,
    tDBConnectionAttr Attribute,
    void *Value);
    and get the CVI CAObjHandle reference. With this you could then call the CVI ActiveX function
    CA_GetInterfaceFromObjHandle(
    CAObjHandle Object_Handle,
    const IID *Interface_Id,
    int Force_AddRef,
    void *Inte
    rface_Ptr,
    int *Did_AddRef);
    to get the actual ActiveX interface reference. This would have to be converted into a LabVIEW reference.
    You may want to consider just using LabVIEW to open a new parallel reference only using the toolkit.
    Scott Richardson
    National Instruments

  • How can i restore my data synchronised from a serv...

    I use Nokia C3-00, And in My country synchronisation with server is not available except i perform phone switch or with a PC...But in thesame country of mine there is a server people use to synchronise...And when i tried it on my phone with the settings given to me...I synchronised my contacts,notes and calender...and the phone said 'synchonisation sucessfull' but after i restored my phone coz it had an error..and restoring it deleted my data(contacts,notes etc)...Now my question is, how can i restore my data(contacts,notes) that i synchronised ? Coz i checked d phone...i did not see an option to restore d data.....And if i can't, i'm sorry but nokia put that 'sync with server' feature just for fun ...

    TSNA - My system crashed 1/2 way through opening up Parallels.  I use Parallels for Quicken & Quickbooks only.  My system locked up & I had to power down to get any response on the screen.  When it started back up I got a screen that said Restore from Time Machine, Safe Startup (or some such words) and one other choice.  NONE of which would do anything. - No response to any clicking, entering, up down etc.  I called over my Apple friend and he could not get it going,.  Ended up having to Reload O/S from the startup disks and reformat my hard drive.  Reformatted because I wanted to get rid of Parallels which has painfully slowed down my entire system.  I never keep it open unless I am working with Quickbooks or Quicken.  Therefore I had decided to start using Boot Camp anyway.  So I would have had to reformat my hard drive to do that regardless of this freeze up of my system.
    This whole thing has taken days to get my documents off Time Capsule.  Time Machine would then not restore to my "new" or reformatted hard drive, so all the files on the Time Capsule were hidden.  Total nightmare !
    Because now I can't get iPhoto APP back on my system as it is not available and have to use the new PHOTO which I hear is not good.

  • How can I remove the blue background from my PDFs files

    How can I remove the blue background from my PDFs files

    Which tutorial?
    Answers are in your HTML and CSS code.  What is the link to your online test page?
    Nancy O.

  • How can i convert the date from M to MM ?

    Dear Guru ,
    I need to upload my list to SAP table , and in the list , we are using YYYY/M/D format ( Eg. 2010/5/20 , 2010/10/1 ) .
    And now i want to convert all date format to YYYY/MM/DD , Is it possibile to do that ?
    Here is my code , but it doesn't work . It returned "2009//3//5" format .
    data: ld_date_int type datum.
    data : test(10) type c.
    test = '2009/3/5' .
    ld_date_int = test .
    WRITE : SY-SUBRC , LD_DATE_int .
    Does SAP provide a standard function can convert the date format ?
    Thanks .
    Best Regards,
    Carlos Zhang

    Hi Dear
    You can try in this way :::
    data: ld_date_int type string.
    DATA : ld_string TYPE string.
    data : test(10) type c,
           ld_res1(4) TYPE c,
           ld_res2(2) TYPE c,
           ld_res3(2) TYPE c.
    DATA : ll_res2 TYPE i,
           ll_res3 TYPE i.
    test = '2009/03/5' .
    ld_date_int = test .
    ld_string = strlen( ld_date_int ).
    CASE ld_string.
      WHEN 10.
       WRITE : SY-SUBRC , LD_DATE_int.
      WHEN OTHERS.
        SPLIT ld_date_int at '/' INTO ld_res1 ld_res2 ld_res3 in CHARACTER MODE.
        ll_res2 = strlen( ld_res2 ).
        ll_res3 = strlen( ld_res3 ).
        IF NOT ll_res2 eq 2 and not ll_res3 eq 2.
          CONCATENATE: '0' ld_res2 INTO ld_res2.
          CONCATENATE: '0' ld_res3 INTO ld_res3.
          CONCATENATE ld_res1 '/' ld_res2 '/' ld_res3 INTO ld_date_int.
          WRITE : SY-SUBRC , LD_DATE_int.
        ENDIF.
        IF ll_res2 eq 2 and not ll_res3 eq 2.
          CONCATENATE '0' ld_res3 INTO ld_res3.
          CONCATENATE ld_res1 '/' ld_res2 '/' ld_res3 INTO ld_date_int.
          WRITE : SY-SUBRC , LD_DATE_int.
        ENDIF.
        IF NOT ll_res2 eq 2 and ll_res3 eq 2.
           CONCATENATE: '0' ld_res2 INTO ld_res2.
            CONCATENATE ld_res1 '/' ld_res2 '/' ld_res3 INTO ld_date_int.
             WRITE : SY-SUBRC , LD_DATE_int.
        ENDIF.
    ENDCASE.

Maybe you are looking for