This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android 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: 19656
    
  18

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
 
wood burning stoves
 
subject: how to update an existing cell of ms excel document with apache HSSF
 
Similar Threads
How to read Excel file from a JSP with out Using ODBC
Output of numbers to Excel
Generating MS-Excel using Apache HSSF
Generating MS-Excel using Apache HSSF
same java program to read xls file and xlsx file using poi