Return-Path: Delivered-To: apmail-poi-user-archive@www.apache.org Received: (qmail 77132 invoked from network); 2 Aug 2007 12:08:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Aug 2007 12:08:58 -0000 Received: (qmail 87708 invoked by uid 500); 2 Aug 2007 12:08:53 -0000 Delivered-To: apmail-poi-user-archive@poi.apache.org Received: (qmail 87693 invoked by uid 500); 2 Aug 2007 12:08:53 -0000 Mailing-List: contact user-help@poi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "POI Users List" Delivered-To: mailing list user@poi.apache.org Received: (qmail 87632 invoked by uid 99); 2 Aug 2007 12:08:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Aug 2007 05:08:52 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Aug 2007 12:08:45 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1IGZTd-0005kY-1M for user@poi.apache.org; Thu, 02 Aug 2007 05:08:25 -0700 Message-ID: <11963279.post@talk.nabble.com> Date: Thu, 2 Aug 2007 05:08:25 -0700 (PDT) From: thomas908 To: user@poi.apache.org Subject: Identifying in bold, italics, underline using POI MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: anshulkayastha@hcl.in X-Virus-Checked: Checked by ClamAV on apache.org 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() { try{ InputStream fis = new FileInputStream("C:/bind.xls");; 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); HSSFRichTextString rts=cell.getRichStringCellValue(); System.out.println("----"+rts); }catch(Exception e) { e.printStackTrace(); } } 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