Results 1 to 3 of 3
  1. #1
    iPee is offline Member
    Join Date
    Jan 2013
    Rep Power

    Default JTable Edit to .csv

    I using forecast program by .csv

    Java Code:
    try {
    String datafile = pathName;
    FileReader fin = new FileReader(datafile);
    DefaultTableModel m = createTableModel(fin,
    new Vector<Object>(Arrays.asList(
    new String[] { "a", "b", "c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"})));
    JFrame f = new JFrame();
    table = new JTable(m);
    f.getContentPane().add(new JScrollPane(table));
    f.setSize(200, 300);
    } catch (Exception e) {
    int row = table.getRowCount();
    int col = table.getColumnCount();
    for(int i=0;i<row;i++){
    for(int j=0;j<col;j++){
    System.out.println(table.getValueAt(j, i));
    JTable Edit to .csv-320925_10151369868529686_533488855_n.jpg

    I need a code for reed file .csv ,edit value in cell on Jtable and export to .csv

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Madgaon, Goa, India
    Rep Power

    Default Re: JTable Edit to .csv

    Quote Originally Posted by iPee View Post
    I need a code
    So write one. This is a forum, not a code factory.

    Post your best efforts and ask a specific question and you're sure to get help.

    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    On vacation
    Rep Power

    Default Re: JTable Edit to .csv

    Also posted at JTable Edit to .csv
    If you don't understand my response, don't ignore it, ask a question.

Similar Threads

  1. Replies: 4
    Last Post: 04-02-2012, 07:57 PM
  2. Replies: 2
    Last Post: 02-22-2012, 11:09 AM
  3. Edit jar, see the code, edit code and back it as a jar
    By RichersooN in forum New To Java
    Replies: 1
    Last Post: 10-10-2011, 05:33 AM
  4. Edit .jar
    By jwerre in forum New To Java
    Replies: 1
    Last Post: 10-04-2009, 04:35 AM
  5. Display and Edit JTable after Deserialization
    By grottman in forum New To Java
    Replies: 2
    Last Post: 04-11-2009, 04:26 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts