poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thomas908 <anshulkayas...@hcl.in>
Subject Identifying in bold, italics, underline using POI
Date Thu, 02 Aug 2007 12:08:25 GMT

We are using Apache POI 3.0 for reading values from an excel sheet.
We have a requirement which requires us to identify if some word in the
excel sheet is in bold or italics or underline.

Can anyone please tell me how to do this?

This is the code I am using

      void func()

                        InputStream fis = new
                        POIFSFileSystem fs = new POIFSFileSystem( fis );
                  HSSFWorkbook wb = new HSSFWorkbook(fs);
                  HSSFSheet sheet = wb.getSheetAt(0);
                  HSSFRow row=sheet.getRow(0);
                        HSSFCell cell=row.getCell((short)0);
             }catch(Exception e)
The problem is once the value of cell is fetched in the code all formatting
is lost. Please tell me how to find out the formatting.

The value in cell could be something like

"abc pqr xyz"

where pqr is in bold,
abc is in italics

View this message in context: http://www.nabble.com/Identifying-in-bold%2C-italics%2C-underline-using-POI-tf4205765.html#a11963279
Sent from the POI - User mailing list archive at Nabble.com.

To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org

View raw message