sonia arora

Ranch Hand
+ Follow
since Mar 10, 2010
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by sonia arora

the code may work any way.
but the correct way to update or insert is to use executeUpdate().
executeQuery should be used with select command.
with update, insert, delete use executeUpdate because otherwise a exception is raised :
"No Result Set was produced"
i am able to read data in form of object of jexcelapi i.e sheet
eg:import java.io.File;
import java.util.Date;
import jxl.*;

...

Workbook workbook = Workbook.getWorkbook(new File("myfile.xls"));
Sheet sheet = workbook.getSheet(0);



so how do i pass this sheet into an access db existing table that is how to build the JDBC SQL query which picks data from excel to access
i can use JXL to copy data from one excel to another but can i copy excel to access?
yes i have read the mentioned sites.
i am using jexcelapi for handling excel instead of POI.
and to connect with access i am using JDBC.

But the issue is that the database is in access and i want to develop a utility in my tool,
such that when ever one wants to add/update many records at a time, the user would not add each record by the GUI individually,
instead just import the excel and records get copied into access.

so i am thinking of using a JFileChooser to browse the excel file and then on click of a button to do the import thats copying of data to access.
so if any one has any idea about how to do so.
thanks...
Actually I am developing a java application in which I want to develop an import utility that will use JFileChooser, so how can I import Excel file appended to Access database.
ok thanks.
i would try as you say.
I have developed a small application in java.
How can i convert this into a .exe file ,
so that it could be independently distributed or run on any other machine?

because in java .class files are formed...
can anyone help?
How can i copy a excel sheet data to a access table from java code?
using the below link
http://www.java2s.com/Code/Java/Swing-JFC/CheckBoxNodeTreeSample.htm
i have created a JTree with Checkboxes can any one tell how can i attach a ItemListener to each
Checkbox node.


Can anyone help.
12 years ago
thanks. issue got resolved.
i am trying to use jexcelapi to generate output in excel sheet.
i am able to compile the file .
but when i run it by command prompt as:
java -classpath "c:\program files\jexcelapi\jxl.jar ";"c:\program files\java\jdk1.6.0_18\bin" create
then error is encountered that is:
"Exception in thread "main" java.lang.NoClassDefFoundError:;
caused by: java.lang.NoClassFoundException:,
....
cound not find main class:,program will exit.


but the create.class file is there in bin folder. then why this exception .
can anyone help?
Excel installed in PC
I am developing a small application in java.
i want to know how can i open a excel sheet on click of a button.
i have downloaded jxl and jexcelapi but do not know how to use them.
where to place those downloads because there is no .exe file.
i have read the tutorial about how to read and write but how to make the .jar file work.
please can any one help. please.