How export data from MySql table to a Word document in java

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • srinivasuv
    New Member
    • Jan 2007
    • 2

    How export data from MySql table to a Word document in java

    Hi Friedns,

    I am working on a j2ee project. How to export MySql table data to a word document......o r to a rtf file.......... Urgent......... give me immediate reply...... send to :
    vsrinivas8@yaho o.com
  • srinivasuv
    New Member
    • Jan 2007
    • 2

    #2
    How export data from MySql table to a Word document in java

    Hi Friedns,

    I am working on a j2ee project. How to export MySql table data to a word document......o r to a rtf file.......... Urgent......... give me immediate reply...... send to :
    vsrinivas8@yaho o.com

    Comment

    • r035198x
      MVP
      • Sep 2006
      • 13225

      #3
      Originally posted by srinivasuv
      Hi Friedns,

      I am working on a j2ee project. How to export MySql table data to a word document......o r to a rtf file.......... Urgent......... give me immediate reply...... send to :
      vsrinivas8@yaho o.com
      this should help you.

      Comment

      • 123456prakash
        New Member
        • Jan 2007
        • 35

        #4
        Originally posted by srinivasuv
        Hi Friedns,

        I am working on a j2ee project. How to export MySql table data to a word document......o r to a rtf file.......... Urgent......... give me immediate reply...... send to :
        vsrinivas8@yaho o.com

        Hi
        This is the query to export and import file from and to Mysql table

        exporting

        Statement stmt = con.createState ment();
        String tablename = "employee";
        // path of the file
        String empfilename = "F:\\\\newfolde r\\\\empfile.tx t";

        File empfile = new File(empfilenam e);
        if (rmfile.exists( ) == true)
        rmfile.delete() ;
        stmt.execute("S ELECT * INTO OUTFILE \"" + empfilename
        + "\" FROM " + tablename);


        Importing

        String query = "LOAD DATA INFILE \"" + empfilename + "\" INTO TABLE " + tablename;

        I hope this will help you

        Comment

        Working...