Me Simple
2010-07-12 21:37:05 UTC
Hi,
I am using Apachi POI to create a excel file on runtime. The excel file may
have variable number columns (number of columns depends on run time). The
value for One of the column has HTML parsed html string as shown below:
Listing 1:
<html>My String</html>
However, when I open the excel file, the HTML column appears as is and
doesn't appear parsed like this one.
Listing 2:
My String
Is there a way to display the html as shown in listing 2 in run time.
thanks.
The code used for creating a the cell is shown below:
HSSFCellStyle headerCellStyle;
HSSFWorkbook workBook = null;
workBook = new HSSFWorkbook();
HSSFCell cell = row.createCell(columnIndex);
HSSFRichTextString textString = new HSSFRichTextString(value);
headerCellStyle = workBook.createCellStyle();
headerCellStyle.setFont(getHeaderFont());
headerCellStyle.setWrapText(false);
cell.setCellStyle(headerCellStyle);
cell.setCellValue("<html>My String</html>");
I am using Apachi POI to create a excel file on runtime. The excel file may
have variable number columns (number of columns depends on run time). The
value for One of the column has HTML parsed html string as shown below:
Listing 1:
<html>My String</html>
However, when I open the excel file, the HTML column appears as is and
doesn't appear parsed like this one.
Listing 2:
My String
Is there a way to display the html as shown in listing 2 in run time.
thanks.
The code used for creating a the cell is shown below:
HSSFCellStyle headerCellStyle;
HSSFWorkbook workBook = null;
workBook = new HSSFWorkbook();
HSSFCell cell = row.createCell(columnIndex);
HSSFRichTextString textString = new HSSFRichTextString(value);
headerCellStyle = workBook.createCellStyle();
headerCellStyle.setFont(getHeaderFont());
headerCellStyle.setWrapText(false);
cell.setCellStyle(headerCellStyle);
cell.setCellValue("<html>My String</html>");
--
View this message in context: http://old.nabble.com/SHow-HTML-text-in-one-of-the-excel-cell-tp29144294p29144294.html
Sent from the POI - User mailing list archive at Nabble.com.
View this message in context: http://old.nabble.com/SHow-HTML-text-in-one-of-the-excel-cell-tp29144294p29144294.html
Sent from the POI - User mailing list archive at Nabble.com.