Right, now I understand. You want HSSF to parse html markup for you.

The short answer to your question then is no, it cannot do this. You will
have to create a tool to parse the html and extract the information from the
markup to create the cells. As an example of what I mean, what font and what
size should HSSF use to render the example you gave?

Just a simple question, why do you want to use HSSF to populate an Excel
spreadsheet in this manner? Did you know that you can use Excel to open an
html file and that it - Excel that is - can parse the markup and render the
page for you? A short way around your problem would be to use Java to create
a text file containing the html code and then ask it to start Excel for you
using the Desktop class.


Satish HS wrote:
> 
> Alright, here is my need, My input is a html String as below:
> String str = "<html>Some word</html>";
> 
> How do I pass this on using the API to Excel Cell, I want the excel cell
> to
> display "Some word"  in italic.
> The actual need is not just to display the italic but to support all types
> of html (rtf, background color, font, including images etc..)
> I hope it is clear now, please let me know if you any doubts.
> 
> Regards,
> Satish HS
> 
> 
> On Wed, Mar 11, 2009 at 3:56 AM, MSB <[email protected]> wrote:
> 
>> cell
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Writing-html-code-to-xls-cell-tp22441551p22461389.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