Win a copy of OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide: Exam 1Z0-815 this week in the Programmer Certification forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

handling excel sheet with java

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i need to open a excel sheet on click of a button.
and retrive some data from excel sheet and store it in access database.
need help.
 
Rancher
Posts: 43011
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is the problem the opening and reading of an Excel file, or the storing of data in a DB? What do you have so far?
 
sonia arora
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have created JDBC connection .
i am able to select (read) data from excel sheet
but i need to open a new Excel sheet on click of a button from gui,
displaying the attributes i select that is the checkboxes i select.
 
Ulf Dittmer
Rancher
Posts: 43011
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So the code already reads and displays some values from an Excel sheet, and now the problem is that you need to add a button to the GUI that causes a different Excel sheet (or file) to be opened, and the currently displayed values are replaced by values of this newly opened sheet/file - is that correct? If so, since you already know how to open an Excel file, read values from it and display them, where is the problem in implementing this?
 
sonia arora
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i need the code to open , create a excel sheet on click of button.
i.e how to create new excel sheet?
 
Ulf Dittmer
Rancher
Posts: 43011
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A very capable library for handling (including creating) Excel files is Apache POI; its web site has numerous examples of how to accomplish all kinds of tasks.

But you said that you're able to read values from an Excel sheet, for which you are presumably using some library; care to tell us how you're doing that?
 
sonia arora
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have used sql query i.e. "select * from [sheet$]" to read data values.
but nt able to create.
nowi wud visit apache and see if it works.
 
Bartender
Posts: 2653
18
Netbeans IDE C++ Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sonia,

sonia arora wrote:nowi wud visit apache and see if it works.

Please UseRealWords.
 
She still doesn't approve of my superhero lifestyle. Or this shameless plug:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!