Posted Wednesday, December 31, 1969 @ 23:59:59
I am trying to copy cells from excel to QuickTable and QuickTable to excel, I have enabled quicktable by calling
yourQuickTable.enableExcelCopyPaste() ; but still it not working here is code :import javax.swing.*;
import quick.dbtable.*;
import java.sql.*;
public class QuickTableFrame extends JFrame
{
public QuickTableFrame()
{
//set Frame properties
setSize(300,200);
setVisible(true);
//create a new quicktable
quick.dbtable.DBTable dBTable1 = new quick.dbtable.DBTable();
//add to frame
getContentPane().add(dBTable1);
//set the database driver to be used, we are using jdbc-odbc driver
dBTable1.setDatabaseDriver("oracle.jdbc.driver.OracleDriver");
/*
set the jdbc url,"quicktabledemo" is the data source we have created
for the database
*/
try
{
//dBTable1.setJdbcUrl("jdbc:odbc:quicktabledemo");
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection con = DriverManager.getConnection("jdbc:oracle:thin:@3.177.128.223:1521:train", "iriuwappid", "iri404");
dBTable1.setConnection(con);
// set the select statement which should be used by the table
dBTable1.setSelectSql("select * from EMPL");
//to create the navigation bars for the table
dBTable1.createControlPanel();
//connect to database & create a connection
//dBTable1.connectDatabase();
dBTable1.enableExcelCopyPaste() ;
//fetch the data from database to fill the table
dBTable1.refresh();
}
catch(SQLException e)
{
e.printStackTrace();
}
catch(ClassNotFoundException e)
{
e.printStackTrace();
}
}
public static void main(String[] args)
{
//create a new table frame
QuickTableFrame myframe = new QuickTableFrame();
}
}
Can anyone help me ?
Thanks