• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

handling excel sheet with java

 
sonia arora
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.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • 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: 42968
73
  • 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: 42968
73
  • 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.
 
Jan Cumps
Bartender
Posts: 2599
12
C++ Linux Netbeans IDE
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic