Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to update an existing cell of ms excel document with apache HSSF

 
anish reddy
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
urg how to update an existing cell of ms excel document with apache HSSF,


sample code to update in a same source file that has been opened for reading.
 
Rob Spoor
Sheriff
Pie
Posts: 20492
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you able to read the file? Are you able to print the value of a cell? If so I'm sure you'll be able to find a method from the Javadoc pages that allows you to set the value.
 
anish reddy
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
iam able to read xls file and print it on console,but unable to update same excel cell with new value.

iam setting the new value for a cell but its not reflecting in original cell.

unless until i write a into a new file.

please guide me regarding that.
or send
few code sample to update a old cell with new cell value.
 
Rene Larsen
Ranch Hand
Posts: 1179
Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You read the Excel document, and do the changes - then you write the document back to the disk (save the document)

http://poi.apache.org/spreadsheet/quick-guide.html#ReadWriteWorkbook
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic