0

I wonder whether it's possible to use Java JExcepAPI to create an Excel file cell (Label) containing text "Red Rose Blue Sky" where "Rose" is shown in red and "Blue" is - guess what?

So far, it looks like JExcelAPI can set the style for each cell as a whole only. It is true that one can set a number of styles there (underline, colour), but they always relate to the whole cell. How to style only part of the cell?

CellFormat and related APIs do not show this http://jexcelapi.sourceforge.net/resources/javadocs/2_6_10/docs/jxl/format/CellFormat.html

A related question has been asked before here (http://stackoverflow.com/a/8397419/1037626) a while ago, but I'd like to bring this question up again as the answer there does not help me.

mgaert
  • 2,338
  • 21
  • 27

1 Answers1

1

It is not possible in the current version (2.6.10), even when you are copying existing workbook.

It is mentioned in the FAQ ("Does JXL support feature XXXXXX?).

You may use jxl.jar included into the distribution archive to verify if a particular feature is supported - create a workbook that uses this feature and perform a copy using JExcel:

 java -jar jxl.jar -rw TestFile.xls CopiedFile.xls

Then check if the feature is present in CopiedFile.xls with Excel. If it is here then it is supported (at least by copying).

Darth Beleg
  • 2,657
  • 24
  • 26