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

Similar Messages

  • 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

  • Student in distress: Read data from text file to fill a JTable

    I'm already late 2 weeks for my project and I still can't figure this out :(
    The project is made of 3 classes; the main one is Viewer.java; it creates the interface, Menu.java that manages the menu and the methods related to it and finally JTableData.java that extends JTable ( This is the part that I don't really understand)
    In the class MENU.JAVA I wrote the method jMenuOpen_actionPerformed(...) for the button OUVRIR (Open) that let's me select the file to read, then puts the content in a 2D table. Here' s my problem: I have to somehow update the content of the table created in VIEWER.JAVA with the content read from the file (cvs file delimited by ";") using a JTableData object (?)
    //THIS IS THE FIRST CLASS VIEWER.JAVA THAT CONTAINS THE MAIN METHOD
    //AND CREATES THE INTERFACE
    package viewer;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class Viewer extends JFrame {
      public Menu menu = null;
      GridLayout gridLayout1 = new GridLayout();
      JTabbedPane jTabbedPane = new JTabbedPane();             
      JTableData jTableInfo = new JTableData(30, 7);
      public Viewer() {
              addWindowListener(new WindowAdapter()
              {               public void windowClosing(WindowEvent e)
                        dispose();
                        System.exit(0);
            try 
                jbInit();
                this.setSize(1000, 700);
                this.setVisible(true);
            catch(Exception e)
                e.printStackTrace();
      public static void main(String[] args) {
          Viewer viewer = new Viewer();
      private void jbInit() throws Exception {
        menu = new Menu(this);
        gridLayout1.setColumns(1);
        this.setTitle("Viewer");
        this.getContentPane().setLayout(gridLayout1);
        jTableInfo.setMaximumSize(new Dimension(0, 64));
        jTableInfo.setPreferredSize(new Dimension(0, 64));
        //TO DO Partie de droite
        JTabbedPane webViewerTabs = new JTabbedPane();
        //972 3299
        //java.net.URL URL1 = new java.net.URL("http://www.nba.com");
        //java.net.URL URL2 = new java.net.URL("http://www.insidehoops.com");
        //java.net.URL URL3 = new java.net.URL("http://www.cnn.com");
        JEditorPane webViewer01 = new JEditorPane();
        webViewer01.setEditable(false);
        //webViewer01.setPage(URL1);
        JEditorPane webViewer02 = new JEditorPane();
        webViewer02.setEditable(false);
        //webViewer02.setPage(URL2);
        JEditorPane webViewer03 = new JEditorPane();
        webViewer03.setEditable(false);
        //webViewer03.setPage(URL3);
        webViewerTabs.addTab("Site01", webViewer01);
        webViewerTabs.addTab("Site02", webViewer02);
        webViewerTabs.addTab("Site03", webViewer03);
        jTabbedPane.add(webViewerTabs);
            //End TO DO   
        this.getContentPane().add(jTableInfo);
        this.getContentPane().add(jTabbedPane);
        this.setJMenuBar(menu);  
    //This is the MENU.JAVA CLASS WHERE I OPEN THE FILE, READ THE
    //CONTENT AND WHERE I SHOULD SEND THE DATA TO THE TABLE.
    //Title:        Menu
    //Author:       Luc Duong
    package viewer;
    import javax.swing.*;
    import java.awt.event.*;
    import java.io.*;
    import java.util.*;
    public class Menu extends JMenuBar {
      JMenu jMenu1 = new JMenu();
      JMenuItem jMenuNew = new JMenuItem();
      JMenuItem jMenuOpen = new JMenuItem();
      JMenuItem jMenuSave = new JMenuItem();
      JMenuItem jMenuExit = new JMenuItem();
      JMenuItem jMenuApropos = new JMenuItem();
      JFileChooser fileChooser = new JFileChooser();
      Viewer viewer = null;
      boolean isFileChanged = false;
      private File fileName;
      static String data [][] = new String[7][9];
      public int lineCount;
      public Menu(Viewer viewer) {
        try  {
          jbInit();
          this.viewer = viewer;
          this.add(jMenu1);
        catch(Exception e) {
          e.printStackTrace();
      private void jbInit() throws Exception {
        jMenu1.setText("Fichier");
        jMenuNew.setText("Nouveau");
        jMenuNew.addActionListener(new java.awt.event.ActionListener() {
          public void actionPerformed(ActionEvent e) {
            jMenuNew_actionPerformed(e);
        jMenuOpen.setText("Ouvrir");
        jMenuOpen.addActionListener(new java.awt.event.ActionListener() {
          public void actionPerformed(ActionEvent e) {
            jMenuOpen_actionPerformed(e);
        jMenuSave.setText("Sauvegarder");
        jMenuSave.addActionListener(new java.awt.event.ActionListener() {
          public void actionPerformed(ActionEvent e) {
            jMenuSave_actionPerformed(e);
        jMenuExit.setText("Quitter");
        jMenuExit.addActionListener(new java.awt.event.ActionListener() {
          public void actionPerformed(ActionEvent e) {
            jMenuExit_actionPerformed(e);
        jMenuApropos.setText("A propos");
        jMenuApropos.addActionListener(new java.awt.event.ActionListener() {
          public void actionPerformed(ActionEvent e) {
            jMenuApropos_actionPerformed(e);
        jMenu1.add(jMenuNew);
        jMenu1.add(jMenuOpen);
        jMenu1.add(jMenuSave);
        jMenu1.add(jMenuExit);       
        jMenu1.add(jMenuApropos);   
      void jMenuNew_actionPerformed(ActionEvent e) {
      //THIS IS THE METHOD I'M WORKING ON RIGHT NOW
      void jMenuOpen_actionPerformed(ActionEvent e) {
          fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
          int result = fileChooser.showOpenDialog(this);
          if (result == JFileChooser.CANCEL_OPTION) return;
          if (result == JFileChooser.APPROVE_OPTION)
              //[email protected]
              File chosenFile = fileChooser.getSelectedFile();
              String path = chosenFile.getPath();
              String nom = chosenFile.getName();
              boolean exist = chosenFile.exists();
              try
                FileReader fr = new FileReader(chosenFile);
                BufferedReader reader = new BufferedReader(fr);
                System.out.println("Opening File Successful!" + chosenFile.getName());
                //String  qui contient la ligne courante
                String currentLine = new String();
                StringTokenizer currentLineTokens = new StringTokenizer("");
                int row = 0;
                int column = 0;
                while( (currentLine = reader.readLine() ) != null)
                    currentLineTokens = new StringTokenizer(currentLine,";");
                    System.out.println("Now reading line index: " + row);
                    while(currentLineTokens.hasMoreTokens())
                        data[row][column] = currentLineTokens.nextToken();
                        System.out.println(column + "\t" + data[row][column]);
                        if(column>=8) column=-1;
                        column++;
                    row++;
                lineCount = row-1;
                System.out.println("\nNombre total de lignes: " + lineCount);
            catch(Exception ex)
                System.out.println("Test: " + ex.getMessage());
                JOptionPane.showMessageDialog(this, "Erreur d'ouverture du fichier", "Erreur d'ouverture du fichier", JOptionPane.ERROR_MESSAGE);
      void jMenuSave_actionPerformed(ActionEvent e) {
          if (JFileChooser.APPROVE_OPTION == fileChooser.showSaveDialog(this))
                System.err.println("Save: " + fileChooser.getSelectedFile().getPath());     
      void jMenuExit_actionPerformed(ActionEvent e) {
        if (!isFileChanged)
           System.exit(1);
        else
            JOptionPane.showConfirmDialog(null, "Do you want to save now?", "Save?", JOptionPane.YES_NO_OPTION);
          // ask the user if he want to save
          // yes or no?
          // yes
           jMenuSave_actionPerformed(e);
          // no
          System.exit(1);
      void jMenuApropos_actionPerformed(ActionEvent e) {
    //THIS IS THE JTABLEDATA.JAVA CLASS THAT EXTENDS JTable. I'm not sure
    // how this works :(//Title: JTableData
    //Author: Luc Duong
    package viewer;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class JTableData extends JTable {
    public JTableData(int row, int col)
    super(row, col);

    Hi, Salut
    you should use JTable's DataModel to update your table.
    data[row][column] = currentLineTokens.nextToken();
    jTableInfo.getModel().setValueAt(data[row][column], row, column);
    jTableInfo.repaint();BEWARE CSV files and StringTokenizer, i've had problems with it (for example ;;Test; is not tokenized "", "", "Test")
    StringTokenizer ignores separator when in first position, and ignores double separators. I use this piece of code before tokenize a String :
    private static char _separator = ';';
    private static String checkCsvString(String s) {
             * V�rification du s�parateur inital, perdu par le StringTokenizer et
             * pourtant bien important
            if (s.startsWith("" + _separator)) {
                s = " " + s;
             * V�rification des doubles s�parateurs, perdus par le StringTokenizer
            int index;
            while ((index = s.indexOf("" + _separator + _separator)) >= 0) {
                s = s.substring(0, index) + _separator + " " + _separator + s.substring(index + 2);
            return s;
        }hope it helps
    Nico

  • Cannot get text file to print in jtable. Using text file as a database

    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.
    import javax.swing.*;
    import java.awt.event.*;
    import java.awt.*;
    import java.util.*;
    import java.io.*;
    public class GUIdirectory extends JFrame
    implements ActionListener {
    // Define the components and the layout
    JLabel inputLabel_lastname = new JLabel("Last Name");
    JTextField inputText_lastname = new JTextField("Last Name",15);
    JLabel inputLabel_firstname = new JLabel("First Name");
    JTextField inputText_firstname = new JTextField(" ",15);
    JLabel inputLabel_middleinitial = new JLabel("Middle Initial");
    JTextField inputText_middleinitial = new JTextField(" ",4);
    JButton inputButton = new JButton("Find");
    JPanel inputLayout = new JPanel(new FlowLayout(FlowLayout.CENTER,5,5));
    JButton jButton1 = new JButton();
    //create a new table and scrollpane
    JTable dataTable = new JTable();
    JScrollPane dataTableScrollPane = new JScrollPane();
    public static void main(String args[]) {
    GUIdirectory gui = new GUIdirectory("Telephone Directory");
    gui.show();
    gui.pack();
    //TokenTest tt = new TokenTest();
    //gui.dbTest();
    public GUIdirectory(String Title) {
    super(Title);
    // Add ourselves as a listener for the window closing
    addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent we) {
    exitWindow(1); }
    inputLabel_lastname.setLabelFor(inputText_lastname);
    inputText_lastname.setHorizontalAlignment(JTextField.RIGHT);
    inputText_lastname.addActionListener(this);
    inputLabel_firstname.setLabelFor(inputText_firstname);
    inputText_firstname.setHorizontalAlignment(JTextField.RIGHT);
    inputText_firstname.addActionListener(this);
    inputLabel_middleinitial.setLabelFor(inputText_middleinitial);
    inputText_middleinitial.setHorizontalAlignment(JTextField.RIGHT);
    inputText_middleinitial.addActionListener(this);
    inputButton.addActionListener(this);
    inputLayout.add(inputLabel_lastname);
    inputLayout.add(inputText_lastname);
    inputLayout.add(inputLabel_firstname);
    inputLayout.add(inputText_firstname);
    inputLayout.add(inputLabel_middleinitial);
    inputLayout.add(inputText_middleinitial);
    inputLayout.add(inputButton);
    getContentPane().setLayout(new BorderLayout(5,5));
    getContentPane().add("North",inputLayout);
    dataTableScrollPane.setViewportView(dataTable);
    getContentPane().add("Center",dataTableScrollPane);
    // A default method, primarily used for testing.
    public void actionPerformed(ActionEvent evt) {
    GUIdirectory gui = new GUIdirectory();
    gui.dbTest();
    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
    // Exits the program upon closing the window
    public void exitWindow(int i) {
    System.exit(i);
    public GUIdirectory() {
    try {
    jbInit();
    catch(Exception e) {
    e.printStackTrace();
    private void jbInit() throws Exception {
    jButton1.setText("jButton1");
    this.getContentPane().add(jButton1, BorderLayout.CENTER);

    Nothing happens because in the actionPerformed() method you are creating a new version of GUIdirectory. You just want to execute the dbTest() method of the current instance of GUIdirectory.
    The code should be:
    public void actionPerformed(ActionEvent evt)
    //GUIdirectory gui = new GUIdirectory();
    //gui.dbTest();
    dbTest();

  • How to get data from a file?

    Hello everyone, i'm new to this forum and to java too. Ok, so here is what i want to do:
    I want to get data from a file containing words and numbers and store them into variables that i will use them after to insert into a database table. For example i have a file called employees.txt in this form:
    eid ename zipcode Hire_date
    1000 "Jones" 67226 "12-DEC-95"
    In C++ i declare variables for each data and store them, for example in this case:
    ifstream in("somefile");
    string name, hdate;
    int eid, zip;
    in >> eid >> ename >> zip >> hdate;
    So i want to do the same thing in JAVA but i can't make it work. So, i would appreciate if someone could give me a simple example how to do it. Thank you.

    [http://java.sun.com/docs/books/tutorial/essential/io/index.html]

  • Hi, extract data from xml file and insert into another exiting xml file

    i am searching code to extract data from xml file and insert into another exiting xml file by a java program. I understood it is easy to extract data from a xml file, and how ever without creating another xml file. We want to insert the extracted data into another exiting xml file. Suggestions?
    1st xml file which has two lines(text1.xml)
    <?xml version="1.0" encoding="iso-8859-1"?>
    <xs:PrintDataRequest xmlns:xs="http://com.unisys.com/Anid"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://com.unisys.com/Anid file:ANIDWS.xsd">
    <xs:Person>
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://com.unisys.com/Anid file:ANIDWS.xsd">
    These two lines has to be inserted in the existing another xml(text 2.xml) file(at line 3 and 4)
    Regards,
    bubbly

    Jadz_Core wrote:
    RandomAccessFile? If you know where you want to insert it.Are you sure about this? If using this, the receiving file would have to have bytes inserted that exactly match the number of bytes replaced. I'm thinking that you'll likely have to stream through the second XML with a SAX parser and copy information (or insert new information) as you stream with an XML writer of some sort.

  • Extract data from xml file and insert into another exiting xml fil

    hello,
    i am searching extract data from xml file and insert into another exiting xml file by a java program. I understood it is easy to extract data from a xml file, and how ever without creating another xml file. We want to insert the extracted data into another exiting xml file. Suggestions?
    Regards,
    Zhuozhi

    If the files are small, you can load the target file in a DOM document, insert the data from the source file and persist the DOM.
    If the files are large, you probably want to use a StAX or SAX.

  • 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

  • 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

  • Sending and getting data from external file.

    I'm running it in actionscript 1  and 2 since 3 wouldn't work when getting data from external media. I'm  trying to find out how to post data to a PHP file and getting from that  file I'm trying to make the flash for something that works like a game  but differently. Since I just found out how to make the HTML stuff show  up but a lot of times, some of my text will not appear so I don't know  what's going on.
    Does anyone know how to send and get data both at the same time from a sample file?
    The sample file is example.php
    It has to sent information like ID and NAME
    and it has to get information like Description and userID

    Ned Murphy wrote:
    The tutorial I pointed you to does provide the visuals you requested, both the AS code and sample PHP code, so I can't see where your learning by visuals aspect holds up.... your approach sounds more like you want someone to hand you a tailored solution that you won't need to learn from.  Visuals require reading and doing.  If that fails to get absorbed or you couldn't understand/revise it, what could anyone else prepare for you that would work better?
    I did the tutorial and everything but every time I press the button or even load it, it keeps on saying undefined. I like the have a sample FLA file so I can figure things out. I did everything from the site but it won't work out for me.
    I did step 5 too because it was almost all that I was looking for but it won't even work. keeps on saying undefined. I would show you but webcam max won't work and I can't show you an example.
    EDIT:
    You know it's frustrating when I don't know how the heck I'm supposed to do this stuff. I read the whole dang thing and I still can't get this dang thing working.
    I did everything. EVERYTHING. I just don't get this crap.

  • 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 retrieve PURCHASE ORDER DATA from archieve file and print a report

    Dear all
    1) I have retrieve purchase order data from archived files.
    2)  print purchase order data and created pdf file.
    VIJ.............
    Moderator message - Please ask a specific question - post locked
    Edited by: Rob Burbank on Apr 28, 2009 12:00 PM

    Dear all
    1) I have retrieve purchase order data from archived files.
    2)  print purchase order data and created pdf file.
    VIJ.............
    Moderator message - Please ask a specific question - post locked
    Edited by: Rob Burbank on Apr 28, 2009 12:00 PM

  • 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

  • Help Me... How to get Data from CSV File...?

    Hi Everyone..!
    This is yajiv and am working in CS3 Photoshop platform. I know about Java Script. Is it possible to get the data from CSV files. Actually our client use to send us the CSV files which contains a lot of swatch name and reference files in one particular image name.
    Actually how we work on that CSV file is, first we copy file name to search that CSV file. then get the result to paste into layer name. This process continue till the end of swatch.
    Thank in Advance
    -yajiv

    > Is it possible to get the data from CSV files.
    Have you tried searching this forum?

Maybe you are looking for