• 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

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: 2662
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.
 
Your mother was a hamster and your father was a tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic