aspose file tools*
The moose likes Java in General and the fly likes how to update an existing cell of ms excel document with apache HSSF Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "how to update an existing cell of ms excel document with apache HSSF" Watch "how to update an existing cell of ms excel document with apache HSSF" New topic
Author

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

anish reddy
Ranch Hand

Joined: Apr 19, 2008
Posts: 74
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

Joined: Oct 27, 2005
Posts: 19755
    
  20

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.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
anish reddy
Ranch Hand

Joined: Apr 19, 2008
Posts: 74
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

Joined: Oct 12, 2001
Posts: 1179

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


Regards, Rene Larsen
Dropbox Invite
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to update an existing cell of ms excel document with apache HSSF