• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

handling excel sheet with java

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 2661
19
Netbeans IDE C++ Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Sonia,

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

Please UseRealWords.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic