Data from text file shown in line graph at once

can anyone show me how to read the data from a txt file and show it in a line graph at once? my data is in the form of decimal number such as 3;45;67;89; thank you

Probably not, based on the fact that you can't even word your problem in a sensible manner. So even if someone read your mind to fill in the blanks, you wouldn't understand the solution. And it's probably just stupid homework anyway, cheater.

Similar Messages

  • Cant get data from text file to print into Jtable

    Instead of doing JDBC i am using text file as database. I cant get data from text file to print into JTable when i click find button. Goal is to find a record and print that record only, but for now i am trying to print all the records. Once i get that i will change my code to search desired record and print it. when i click the find button nothing happens. Can you please take a look at my code, dbTest() method. thanks.
    void dbTest() {
    DataInputStream dis = null;
    String dbRecord = null;
    String hold;
    try {
    File f = new File("customer.txt");
    FileInputStream fis = new FileInputStream(f);
    BufferedInputStream bis = new BufferedInputStream(fis);
    dis = new DataInputStream(bis);
    Vector dataVector = new Vector();
    Vector headVector = new Vector(2);
    Vector row = new Vector();
    // read the record of the text database
    while ( (dbRecord = dis.readLine()) != null) {
    StringTokenizer st = new StringTokenizer(dbRecord, ",");
    while (st.hasMoreTokens()) {
    row.addElement(st.nextToken());
    System.out.println("Inside nested loop: " + row);
    System.out.println("inside loop: " + row);
    dataVector.addElement(row);
    System.out.println("outside loop: " + row);
    headVector.addElement("Title");
    headVector.addElement("Type");
    dataTable = new JTable(dataVector, headVector);
    dataTableScrollPane.setViewportView(dataTable);
    } catch (IOException e) {
    // catch io errors from FileInputStream or readLine()
    System.out.println("Uh oh, got an IOException error!" + e.getMessage());
    } finally {
    // if the file opened okay, make sure we close it
    if (dis != null) {
    try {
    dis.close();
    } catch (IOException ioe) {
    } // end if
    } // end finally
    } // end dbTest

    Here's a thread that loads a text file into a JTable:
    http://forum.java.sun.com/thread.jsp?forum=57&thread=315172
    And my reply in this thread shows how you can use a text file as a simple database:
    http://forum.java.sun.com/thread.jsp?forum=31&thread=342380

  • Loading data from text file into ListBox

    I have data in a text file that I want to load into a
    listbox... I have fully mastered handling strings and arrays so I'm
    going to need some help...
    I was wondering how do I get flash to load a text file that
    contains the data below.. and display it line for line like I want
    it to list down the component
    "Launch;7.1.7.6"
    "Engine;7.1.7.6"
    "OSX;7.0.0.2" (or something close to that)
    and I was wondering how do i just get it to take it fromt he
    file.. line for line from where it says exeversion in the file and
    list it in the listbox...
    I'm really thankful to anybody that helps.
    Data in text file:
    quote:
    exeversion=Launch;7.1.7.6;
    exeversion=Engine;7.1.7.6;
    exeversion=LinuxX86;7.0.0.2;
    exeversion=LinuxPPC;7.0.0.2;
    exeversion=LinuxMIPS;7.0.0.2;
    exeversion=OSX;7.0.0.2;
    exeversion=Config;7.1.7.6;
    exeversion=UI;7.1.7.7;
    exeversion=JAVA;7.0.4.5;

    nobody cna help me? i really need to know or have a tutorial
    or something so i can learn from it... i really appreciate anyone
    who helps

  • Charting data from text file in LabVIEW 5.1 for Windows

    I am having some difficulties trying to figure out how to plot a chart with
    data from a file. I would like to be able to read data from a text file
    into a chart using LabVIEW 5.1 for Windows. I have looked in the help
    within the program and online. I have also looked in the user manual and
    the book "LabVIEW for Everyone". Could you please give me specific
    instructions on how I would construct the program to be able to do this.
    Thank you.

    Hi Ellie,
    It depends on how data is stored in that txt file. Usually you load the data into an array either using or , the array if necessary and send it to the graph indicator in required form. If you want a more detailed answer, send me a sample data file ([email protected]).

  • How to extract data from  text file to database table

    Hi ,
    I am trying to upload  data in text file to database table  using GUI_UPLOAD function .what would be the program for that.
    thanks in advance.

    Hi,
    I don't think you have a standard sap program to upload data from file to database table...
    Instead you can create a custom program like this..
    DATA: T_FILEDATA(1000) OCCURS 0 WITH HEADER LINE.
    DATA: T_ZTABLE LIKE ZTABLE OCCURS 0 WITH HEADER LINE.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        filename                      = 'C:\TEST.TXT'
      tables
        data_tab                      = T_FILEDATA
    EXCEPTIONS
       FILE_OPEN_ERROR               = 1
       FILE_READ_ERROR               = 2
       NO_BATCH                      = 3
       GUI_REFUSE_FILETRANSFER       = 4
       INVALID_TYPE                  = 5
       NO_AUTHORITY                  = 6
       UNKNOWN_ERROR                 = 7
       BAD_DATA_FORMAT               = 8
       HEADER_NOT_ALLOWED            = 9
       SEPARATOR_NOT_ALLOWED         = 10
       HEADER_TOO_LONG               = 11
       UNKNOWN_DP_ERROR              = 12
       ACCESS_DENIED                 = 13
       DP_OUT_OF_MEMORY              = 14
       DISK_FULL                     = 15
       DP_TIMEOUT                    = 16
       OTHERS                        = 17
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    LOOP AT T_FILEDATA.
      T_ZTABLE = T_FILEDATA.
      APPEND T_ZTABLE.
    ENDLOOP.
    MODIFY ZTABLE FROM TABLE T_ZTABLE.
    COMMIT WORK..
    Thanks,
    Naren

  • Unable to find file error while loading data from text file to Oracle

    Hi,
    I am having a interface where i am loading a data of Text file to Oracle.
    But when i am trying to do this i am getting following error.
    ODI-1227: Task SrcSet0 (Loading) fails on the source FILE connection SAPMM.
    Caused By: java.sql.SQLException: File not found: d:/mdb/#General.get_filename
         at com.sunopsis.jdbc.driver.file.FileResultSet.<init>(FileResultSet.java:160)
         at com.sunopsis.jdbc.driver.file.impl.commands.CommandSelect.execute(CommandSelect.java:57)
         at com.sunopsis.jdbc.driver.file.CommandExecutor.executeCommand(CommandExecutor.java:33)
    SAPMM is connection name.
    I am using get_filename to get the filename and it is fetching correct value as the this variable refreshes in previous step of this interface.
    KM used for loading is File to SQL
    What would be cause of this error?
    Thanks,
    Mahesh

    Hi,
    Did a testing and following are the result
    I have
    A> created package having steps like
    1. Declaration of variable v_filename.
    2. Refreshing variable v_filename.
    3. Execution of Interface which gets the file name from v_filename and load into target table
    Package executes successfully.
    B> created package having steps like
    1. Declaration of variable v_filename.
    2. Refreshing variable v_filename.
    3. Scenario of Interface which gets the file name from v_filename and load into target table
    Package executes with erre as it is not able to find the file
    C> created package having steps like
    1. Declaration of variable v_filename.
    2. Refreshing variable v_filename.
    3. Execution of Interface which gets the file name from v_filename and load into target table
    4. Now create a scenario of the package , use the generated scenario in another package say main_package
    Execution of main_package is successful.
    Thanks,
    Sutirtha

  • CO-PA load data from text file

    Hello
    At present, in our company, we load data from Excel files to CO-PA. Is there any way to load those data to CO-PA from text files ?
    I will be grateful for any suggestions.

    You can create a structure using KEFA, assign the Value fields in KEFB and then use KEFC to upload data against that structure.
    You have various file format options, but I don't think Excel is one of them... you have have to save the file as txt and upload.
    Play around with those transactions and come back if you need additional help.
    Cheers.

  • Unable to Upload data from text file into BEx Analyzer selection screen

    Hi,
    No response from BEx Analyzer when I am trying to upload around 40,000 material from text file into BEx Analyzer selection screen using "Upload selections" options. But I am able to upload only 10,000 material from text file.  I never faced same kind of issue when I am using BEx Analyzer 3.x.  Please let me know I have to change any settings related to BEx or any other.
    Thanks
    Sri Krishna Ponnada.

    Hello
    It seems you are reaching the .NET memory limitation informed in note 1040454.
    Because 3.5 does not use .NET it can work that.
    Regards,
    Ricardo

  • Remove duplicates while loading data from text file

    Hi,
    Data in text file (some times has duplicates) is being loaded into Oracle 9i database using Informatica. To improve performance, we would like to remove duplicates at the time of each load using Oracle procedure. Could you please help me with this?
    Thanks,
    Lakshmi

    No, our table doesn't have that. Most of the functionality is managed at the informatica level. Is there any other way? Thanks,

  • Continual plotting of data from text file

    I would like help with automated plotting of multiple sets of data on one axis. The file attached shows a sample of the data where the first number (eg 405) is the reference and the next two are the date and time. The data after that all needs to be plotted in a different color. The A.A.. (or .....) does not need to be plotted, the N/A's can be assumed to have either no reading or the same as the previous day. The data needs to be read from a text file and then graphed. The sample shows only a few variations and the reference number is incremented by 1 (I have shown random data) everytime the data is obtained from the source. Is this possible. If it is possible, the system will then need to be expandable to be able to updat
    e the graphs daily as the new data is obtained (although this is not so important at the moment). Can anyone please help me with detailed instructions if possible. All help will be greatly appreciated.
    Thanks
    Nath
    Attachments:
    SAMPLE.txt ‏1 KB

    I have written a rough vi for you in LV 6.0. Basically it shows how to open a file and write the string to an indicator. Then create an array from the numerical parts of the string which are plotted in a graph. I have assumed that the date/time and ref numbers will always be of the same format on each line of text.
    I'm not sure if i have done exactly what you want, but should give you an idea of what to do. Let me know if you have any problems..
    Kim
    Attachments:
    Create_graph_from_string.vi ‏51 KB
    sample.txt ‏1 KB

  • Read data from text file one by one using for loop

    Dear Forum
    I want to read data of single colum of text file inside the for loop one by one(for each iteration value must be replaced by another value of text file).This value is used by a formula inside for loop. also after completion of iterations the values must be plotted on xy graph. How to do it.? please help me.
    profravi

    It's not very efficient to read a file line by line. Much simpler to read it all at once and then auto-index the results inside a for loop. The image below shows a generic solution to your problem. This assumes that the data in the file is in a single column.
    I would also recomend checking ou the learning LabVIEW resources here.
    I would aslos suggest that since this type of question is not specific to either NI-Elvis or the LabVIEW SE, you should post similar questions to the LabVIEW board. If you have problems, attaching a sample of the text file would help.
    Message Edited by Dennis Knutson on 10-18-2007 09:11 AM
    Attachments:
    XY Graph From File.PNG ‏4 KB

  • Deleting data from text files

    Hi there,
    I am having a real battle trying to delete data from a text file I am using. There seems to be this giant cloud with Java, where there is no real easy way to delete text from a file??
    I have a JFrame with two textfields on it where you enter the username and pcname. There is a OK button once you have entered those details.
    On action event I would like those two details, to be removed from the text file that has been read in.
    I have a text file like this:
    bob
    pc1
    bill
    pc2
    The data above gets written no problem, one at at a time using the below.
    File f = new File("\\c:\\filename.txt");
    String strToWrite;
    try
    FileOutputStream fstr = new FileOutputStream(f);
    strToWrite = username1+ '\r'+'\n' ;
    byte[] bytes = strToWrite.getBytes(); fstr.write(bytes);
    strToWrite = pcname1 + '\r'+'\n' ;
    byte[] bytes2 = strToWrite.getBytes(); fstr.write(bytes2);
    strToWrite = username2+ '\r' +'\n' ;
    byte[] bytes3 = strToWrite.getBytes(); fstr.write(bytes3);
    strToWrite = pcname2 + '\r'+'\n' ;
    byte[] bytes4 = strToWrite.getBytes(); fstr.write(bytes4);
    catch (IOException e)
    System.out.println("Error -- " + e.toString());
    To read them back in I have made the follwoing:
    BufferedReader br= null;
    Count = 0;
    try
    br = new BufferedReader(new InputStreamReader(new FileInputStream("\\c:\\filename.txt")));
    String s = "";
    while((s=br.readLine()) != null )
    Count = 1;     
         //System.out.println("Data is " + s);
         inboundtext = s;
         if ( Count == 1 )
    break;
    while((s=br.readLine()) != null )
    //System.out.println("Data is " + s);
    inboundtext = s;
    Count = 2;
    if ( Count == 2 )
    break;
    catch(IOException ie)
    finally
    try
         if(br!=null) br.close();
    catch(Exception e)
    Now the above I know, is reading each line of the text file one at a time.
    Now what I would like is that when the text that we got from the textfields, using getText(), be removed from the file without destroying the rest of the records in there? Why is it so easy to add and replace files, but not do any deleting from them?
    please help!!

    sorry, FileOutputStream fstr = new FileOutputStream(f);
    should be FileOutputStream fstr = new FileOutputStream(f, true);

  • How to save data from text file in databse for a transaction...

    Hi Guys,
    I have a text file which has some data related relevant to transaction VA01 separated by tabs.
    Now instead of going in the transaction in VA01 and thne feeding the data manually, I would like this data
    to get read automatically from the text file and get processed field by field for transaction VA01 and thne get saved.
    How do I achieve this ? Do I have to use SHDB or some other method ?a

    hi tushar,
    REPORT  ZCALL_TRANS_TAB1                      .
    TABLES: LFA1,LFBK,lfb1.
    *& internal table declaration
    data: BEGIN OF it_vendor occurs 0,
           LIFNR LIKE LFA1-LIFNR,
           bukrs like lfb1-bukrs,
           END OF it_vendor.
    DATA: BEGIN OF IT_BANK occurs 0,
          LIFNR LIKE LFA1-LIFNR,
          BANKS LIKE LFBK-BANKS,
          BANKL LIKE LFBK-BANKL,
          BANKN LIKE LFBK-BANKN,
          koinh like lfbk-koinh,
          END OF IT_BANK.
    data: it_bdcdata like bdcdata occurs 0 with header line.
    data: it_messages like bdcmsgcoll occurs 0 with header line.
    *selection screen.
    selection-screen: begin of block b1 with frame.
    parameters: p_file like rlgrap-filename default 'c:/vendor.txt'
    obligatory.
    parameters: p_file1 like rlgrap-filename default 'c:/xyz.txt'
    obligatory.
    selection-screen: end of block b1.
    *at selection screen.
    at selection-screen on value-request for p_file.
    perform f4_help using p_file.
    at selection-screen on value-request for p_file1.
    perform f4_help1 using p_file1.
    *start of selection
    start-of-selection.
    *******uploading file
    perform upload_file using p_file P_FILE1.
    ******open session.
    perform populate_data.
    *&      Form  f4_help
          text
         -->P_P_FILE  text
    form f4_help  using    p_p_file.
    data: l_file type ibipparms-path.
    call function 'F4_FILENAME'
    importing
       file_name           = l_file.
       p_file = l_file.
    endform.                    " f4_help
    *&      Form  POPULATE_DATA
          text
    -->  p1        text
    <--  p2        text
    form populate_data .
    DATA: L_STRING TYPE STRing.
    DATA: L_COUNTER(2) TYPE n.
    loop at it_vendor.
    perform bdc_dynpro      using 'SAPMF02K' '0106'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RF02K-D0130'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'RF02K-LIFNR'
                                   it_vendor-lifnr.
    perform bdc_field       using 'RF02K-BUKRS'
                                  it_vendor-bukrs.
    perform bdc_field       using 'RF02K-D0130'
                                  'X'.
    perform bdc_dynpro      using 'SAPMF02K' '0130'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFBK-bankn(03)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=UPDA'.
    ******CALL TRANSACTION.
    call transaction 'FK02' using it_bdcdata mode 'A'
                            messages into it_messages.
    write:/ sy-subrc.
    perform format_messages.
    clear it_bdcdata.
    refresh it_bdcdata.
    endloop.
    endform.                    " POPULATE_DATA
    *&      Form  FORMAT_MESSAGES
          text
    -->  p1        text
    <--  p2        text
    form format_messages .
    data: l_msg(100).
    loop at it_messages.
    call function 'FORMAT_MESSAGE'
    exporting
       id              = it_messages-msgid
       lang            = sy-langu
       no              = it_messages-msgnr
       v1              = it_messages-msgv1
       v2              = it_messages-msgv2
       v3              = it_messages-msgv3
       v4              = it_messages-msgv4
    importing
       msg             = l_msg
    exceptions
       not_found       = 1
       others          = 2
    write:/ l_msg.
      endloop.
    endform.                    " FORMAT_MESSAGES
    *&      Form  bdc_dynpro
          text
         -->P_0173   text
         -->P_0174   text
    form bdc_dynpro  using    value(p_program)
                              value(p_screen).
    it_bdcdata-program = p_program.
    it_bdcdata-dynpro = p_screen.
    it_bdcdata-dynbegin = 'X'.
    append it_bdcdata.
    clear it_bdcdata.
    endform.                    " bdc_dynpro
    *&      Form  bdc_field
          text
         -->P_0178   text
         -->P_0179   text
    form bdc_field  using    value(p_fnam)
                             value(p_fval).
    it_bdcdata-fnam = p_fnam.
    it_bdcdata-fval = p_fval.
    append it_bdcdata.
    clear it_bdcdata.
    endform.                    " bdc_field
    *&      Form  upload_file
          text
         -->P_P_FILE  text
         -->P_P_FILE1  text
    form upload_file  using    p_p_file
                               p_p_file1.
    CALL FUNCTION 'WS_UPLOAD'
    EXPORTING
      CODEPAGE                      = ' '
       FILENAME                      = P_P_FILE
       FILETYPE                      = 'DAT'
      HEADLEN                       = ' '
      LINE_EXIT                     = ' '
      TRUNCLEN                      = ' '
      USER_FORM                     = ' '
      USER_PROG                     = ' '
      DAT_D_FORMAT                  = ' '
    IMPORTING
      FILELENGTH                    =
      TABLES
        data_tab                      = IT_VENDOR
    EXCEPTIONS
      CONVERSION_ERROR              = 1
      FILE_OPEN_ERROR               = 2
      FILE_READ_ERROR               = 3
      INVALID_TYPE                  = 4
      NO_BATCH                      = 5
      UNKNOWN_ERROR                 = 6
      INVALID_TABLE_WIDTH           = 7
      GUI_REFUSE_FILETRANSFER       = 8
      CUSTOMER_ERROR                = 9
      NO_AUTHORITY                  = 10
      OTHERS                        = 11
    IF sy-subrc <> 0.
    MESSAGE I000(ZZ) WITH 'UNABLE TO UPLOAD'.
    STOP.
    ENDIF.
    *******UPLOADING BANK DETAILS
    CALL FUNCTION 'WS_UPLOAD'
    EXPORTING
      CODEPAGE                      = ' '
       FILENAME                      = P_P_FILE1
       FILETYPE                      = 'DAT'
      HEADLEN                       = ' '
      LINE_EXIT                     = ' '
      TRUNCLEN                      = ' '
      USER_FORM                     = ' '
      USER_PROG                     = ' '
      DAT_D_FORMAT                  = ' '
    IMPORTING
      FILELENGTH                    =
      TABLES
        data_tab                      = IT_BANK
    EXCEPTIONS
       CONVERSION_ERROR              = 1
       FILE_OPEN_ERROR               = 2
       FILE_READ_ERROR               = 3
       INVALID_TYPE                  = 4
       NO_BATCH                      = 5
       UNKNOWN_ERROR                 = 6
       INVALID_TABLE_WIDTH           = 7
       GUI_REFUSE_FILETRANSFER       = 8
       CUSTOMER_ERROR                = 9
       NO_AUTHORITY                  = 10
       OTHERS                        = 11
    IF sy-subrc <> 0.
    MESSAGE I000(ZZ) WITH 'UNABLE TO UPLOAD'.
    STOP.
    ENDIF.
    endform.                    " upload_file
    *&      Form  f4_help1
    form f4_help1  using    p_p_file1.
    data:l_file1 type ibipparms-path.
    CALL FUNCTION 'F4_FILENAME'
    IMPORTING
       FILE_NAME           = l_file1.
       p_file1 = l_file1.
    endform.                    " f4_help1

  • Pool data from text file and insert into database

    Can anyone tell me how to pool data from a text file and insert into database?
    let's say my text file is in this format
    123456 Peter 22
    234567 Nicholas 24
    345678 Jane 20
    Then I need to insert the all the value for this three column into a table which has the three column name ID, Name, Age
    Anyone knows? I need to do this urgently...Thank in advanced

    1. Use BufferedReader and read the file line by line.
    2. Loop thru the file and do the following steps with in this loop.
    3. Use StringTokenizer to seperate each line into three values (columns).
    4. Now create a insert statement with these values and add the statement to the batch (using addBatch() method of PreparedStatement or Statement).
    5. Finally (after exiting the loop), execute these batch of statements (using ps.executeBatch()).
    Sudha

  • Fetch data from text file to print

    Dear All,
    I am trying to fetch data from a text file in to Oracle database to print.
    The problem I have is that I cannot gather data because this is a statement, generated by a report utility and the data consist of multiple dimensions.
    First 3 fields of data are in the first 3 rows of a page and the rest is displayed column wise for the next 20 rows (5th row to 24th Row). Then there is a page break character ASCII (012) (Hex - 0C)then the next record starts.
    Please give me a solution to fetch first 3 lines to one master table & the column of data to a detail table.
    I konw I can fetch data using SQL Loader but the problem is how can I seperate multiple dimention data.
    Sample
    <page breake>
    Code:123456
    Name:1233445566
    Address:aaaaaaaaaaaaa
    Detail1 Detail2 Detail3
    ======= ======= =======
    AAAAAAA BBBBBBB CCCCCCC
    AAAAAAA BBBBBBB CCCCCCC
    <page break>
    Code:123457
    Name:AAAAAAAA
    Address:AAAAAAAA
    Detail1 Detail2 Detail3
    ======= ======= =======
    AAAAAAA BBBBBBB CCCCCCC
    AAAAAAA BBBBBBB CCCCCCC
    <page break>
    Thank you in advance..
    Regards, Shaamil.

    Try using the package UTL_FILE.
    http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96612/u_file.htm#998101

Maybe you are looking for

  • Help with makin an interface for text files in a directory

    hi all.. i m in need to help for making a GUI, that takes all the filenames from a directory, count them, display all their names on the GUI in form of radio buttons... for the user to choose from.. and then their shud be some options of changin the

  • T540p I7-4710MQ running at 800Mhz

    Hi All, While installing my new t540p I noticed that my cpu is not throttling and keeps running at a slow 800Mhz when running at battery. When I connect the psu all seems to work fine, cpu speed throttles from 800Mhz to 3.5Ghz as it should. I bios ->

  • Problems with History after Google search in Safari

    I've noticed recently that after I have searched on Google, any page that I have found linked in the Google search and visited only appears in my Safari History as a Google referal link, e.g.: http://www.google.co.uk/url?sa=t&rct=j&q=apple%20compress

  • IE6 stretching images in CSS photo viewer

    I'm creating a simple photo viewer with CSS swapping out images. I sized the box to hold them wide enough for the landscape shots, but my verticals, which are narrower are getting stretched. In FF I got them to at least position left (centered would

  • Security update 2014-002 won't install, stuck on gray Software update screen

    My mac mini has been trying to install this security update the past week.  It asks for me to restart, when I do it gets stuck on a Software Updater page or gray screen.  The only way I can proceed is the shut the computer down by manually holding do