Morning Ramon,

What problems are you having when you try to edit the Excel worksheet? I
have just had a look at you previous thread and it ended with a problem
concerning a class that may not have found it's way yet into the lighter
version of the OOXML archive. Are you still facing this problem? If so, I
will have a search back through some older posts because I am certain that
David does mention how to obtain the complete archive somewhere and once I
find it, I will post the link.

If that is not the problem, can you please let us know just what problems
you are facing? The process should be as simple as this;

Create and InputStream attached to the Excel workbook.
Pass that reference to the constructor of the XSSFWorkbook class.
Close the InputStream - and null it out so that it is eligable for garbage
collection.
Use that object to retrieve referenbces to XSSFSHeet objects, from those get
XSSFRow objects and from those get XSSFCell objects.
Once you get down to that level, it is possible to get and set cell values,
get and set cell styles etc.
After you have finished editing the workbook, all you need to do is, create
an OutputStream that will allow you to 'write' the file back to storage and
then call the workbooks write method, pasing the OutputStream to it as the
single argument.

As you can see, the process mirrors exactly the one you would adopt if using
the HSSF stream and this is because many of the calsses in both stream share
common ancestors; the so called SS classes such as Workbook, Sheet, Cell,
CellStyle and so on.

Yours

Mark B


Ramon F Herrera-2 wrote:
> 
> 
> In my experience, we can:
> 
> (1) Create and edit spreadsheets using HSSF.
> 
> (2) Create spreadsheets using XSSF.
> 
> All the examples I have found fail to edit a spreadsheet under XSSF.
> 
> Can somebody please provide a link to a working program that edits 
> XML-based spreadsheets?
> 
> TIA,
> 
> -Ramon
> 
> ps: See my thread "Trying to edit a spreadsheet using XSSF"
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Can-we-edit-spreadsheets-using-XSSF--tp28343163p28348516.html
Sent from the POI - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to