POI does not support conversion between the two different file formats. You would have to write code to retrieve all of the features about the cell and it's contents from the binary format file and code to recreate them within the OOXML format file. There could also be a few bumps along the way so to speak as you would have to check and ensure fonts were available within the target workbook.
It might be worthwhile looking at a simple file format convertor - JODConvertor is the one that springs to mind but I cannot be certain it would allow you to save the file into the OOXML file format. Might still be worth taking a look here http://www.artofsolving.com/opensource/jodconverter One trick that I do know will work is to use OLE\COM if you are working on a Windows platform. With an additional library such as JACOB or the OLE32 sub-package of the Standard Widget Toolkit (SWT and part of Eclipse usually), you can write Java code to control Excel directly and this will certainly allow you to open an xls file and re-save it as an xlsx. Once you have the files all converted into the target format, processing should be trivial. -- View this message in context: http://apache-poi.1045710.n5.nabble.com/Cast-HSSFRichTextString-to-XSSFRichTextString-tp5711676p5711679.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]
