Re: Read Custom format cell value

2010-06-23 Thread MSB
; >>> >>> default: >>> retVal = ""; >>> } >>> return retVal; >>> } >>> >>> private String i

Re: Read Custom format cell value

2010-06-23 Thread Siva_Masilamani
ormatter df = new DataFormatter(); >> //This is where i am trying to add the custom format to the >> list to already available formats. >> //DecimalFormat def=new DecimalFormat("#-#"); >> //df.addFormat("&qu

Re: Read Custom format cell value

2010-06-21 Thread MSB
ingDecimal.java:1207) > at java.lang.Double.parseDouble(Double.java:220) > at > org.apache.poi.xssf.usermodel.XSSFCell.getNumericCellValue(XSSFCell.java:197) > at > org.apache.poi.ss.usermodel.DateUtil.isCellDateFormatted(DateUtil.java:278) > at > com.excel.reader.ExcelDataR

Re: Read Custom format cell value

2010-06-20 Thread MSB
gDecimal.java:1207) > at java.lang.Double.parseDouble(Double.java:220) > at > org.apache.poi.xssf.usermodel.XSSFCell.getNumericCellValue(XSSFCell.java:197) > at > org.apache.poi.ss.usermodel.DateUtil.isCellDateFormatted(DateUtil.java:278) > at > com.excel.reader.ExcelDataReader.isNumberOrDate(ExcelDataReader.java:166) > at com.excel.reader.ExcelDataReader.getCellValue(ExcelDataReader.java:154) > at com.excel.reader.ExcelDataReader.process(ExcelDataReader.java:118) > at com.excel.reader.ExcelDataReader.main(ExcelDataReader.java:249) > Exception in thread "main" ACBS 2001 7528080 Java Result: 1 > > > -- View this message in context: http://old.nabble.com/Read-Custom-format-cell-value-tp28894102p28940911.html Sent from the POI - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@poi.apache.org For additional commands, e-mail: user-h...@poi.apache.org

Re: Read Custom format cell value

2010-06-17 Thread MSB
t; do have to admit I have not looked through the sheets contents >>>>>> throughly yet. >>>>>> >>>>>> Yours >>>>>> >>>>>> Mark B >>>>>> >>>>>> >>>>>> S

Re: Read Custom format cell value

2010-06-17 Thread David Fisher
cell format as 49. >>>>>> >>>>>> So i guess the api consides once the cell type is formula it uses >>>>>> parse double to get the value where it fails as the data contains >>>>>> other characters too. >>>>>>

RE: Read Custom format cell value

2010-06-17 Thread MSB
utility breaks >>>>>> while trying to extract the double value for the cell which shouldn't >>>>>> happen. This seems like a bug to me. >>>>>> >>>>>> Try opening the .xlsx file with an archive utility like WinZip. Unzip >>

RE: Read Custom format cell value

2010-06-17 Thread Siva_Masilamani
If the cell is indeed numeric >>>>> then the value of 't' must be 'n' and you can also see the value of >>>>> 's'. It must be a number that points to the style index in the >>>>> workbook styles section. The styles are kept in a sepa

RE: Read Custom format cell value

2010-06-16 Thread MSB
d in another reply, you should get hold of the >>>> cell style. From the cell style you'll get the format index. From the >>>> format index you can get the format string. And that format string >>>> cannot be directly used as a java format. The format conventions are >>>&g

RE: Read Custom format cell value

2010-06-16 Thread Siva_Masilamani
p code etc. >>> >>> But i just don't know how to do that. >>> >>> Just incase will that help me...if so could you please provide some help >>> on >>> that. >>> >>> >>> Jankiraman, Radhakrishnan wrote: >>

RE: Read Custom format cell value

2010-06-16 Thread MSB
a and excel. Have you tried reading the cell value "as >> a string" ? Unless you need the typed cell value, you might be better off >> just extracting the formatted string as is. >> >> -Rk >> >> __ >> Radhakrishnan Jankiraman >> (

RE: Read Custom format cell value

2010-06-16 Thread Siva_Masilamani
g the formatted string as is. > > -Rk > > __ > Radhakrishnan Jankiraman > (o) +91.20-30239400 extn 520 (c) +91.9822006056 > > > -Original Message- > From: Siva_Masilamani [mailto:saachins...@yahoo.co.in] > Sent: Wednesday, June 16,

RE: Read Custom format cell value

2010-06-16 Thread Jankiraman, Radhakrishnan
iraman (o) +91.20-30239400 extn 520 (c) +91.9822006056 -Original Message- From: Siva_Masilamani [mailto:saachins...@yahoo.co.in] Sent: Wednesday, June 16, 2010 8:29 AM To: user@poi.apache.org Subject: RE: Read Custom format cell value Thanks again. But i was reading the api and came to know that we

Re: Read Custom format cell value

2010-06-15 Thread MSB
oatingDecimal.readJavaFormatString(FloatingDecimal.java:1207) > at java.lang.Double.parseDouble(Double.java:220) > at > org.apache.poi.xssf.usermodel.XSSFCell.getNumericCellValue(XSSFCell.java:197) > at > org.apache.poi.ss.usermodel.DateUtil.isCellDateFormatted(DateUtil.java:278)

RE: Read Custom format cell value

2010-06-15 Thread Siva_Masilamani
oo.co.in] > Sent: Wednesday, June 16, 2010 4:57 AM > To: user@poi.apache.org > Subject: RE: Read Custom format cell value > > > Hi > > Thanks for your reply. > > The file is of type xlsx. > We are receiving this file from our client and we are in no control of > alte

RE: Read Custom format cell value

2010-06-15 Thread Jankiraman, Radhakrishnan
version of POI are you using ? If you don't have control over the format, then no luck. -Rk -Original Message- From: Siva_Masilamani [mailto:saachins...@yahoo.co.in] Sent: Wednesday, June 16, 2010 4:57 AM To: user@poi.apache.org Subject: RE: Read Custom format cell value Hi

RE: Read Custom format cell value

2010-06-15 Thread Siva_Masilamani
June 16, 2010 2:32 AM > To: 'POI Users List' > Subject: RE: Read Custom format cell value > > This is how you try to get a format > > CreationHelper creationHelper = workbook.getCreationHelper(); > > //If this format is one of the default formats, will

RE: Read Custom format cell value

2010-06-15 Thread Jankiraman, Radhakrishnan
-Original Message- From: Siva_Masilamani [mailto:saachins...@yahoo.co.in] Sent: Tuesday, June 15, 2010 10:52 PM To: user@poi.apache.org Subject: Read Custom format cell value Hi I am using apache poi api to read data from the excel file and having problem with particular data format. On

RE: Read Custom format cell value

2010-06-15 Thread Jankiraman, Radhakrishnan
- From: Siva_Masilamani [mailto:saachins...@yahoo.co.in] Sent: Tuesday, June 15, 2010 10:52 PM To: user@poi.apache.org Subject: Read Custom format cell value Hi I am using apache poi api to read data from the excel file and having problem with particular data format. One of the coumns in the

Read Custom format cell value

2010-06-15 Thread Siva_Masilamani
a:166) at com.excel.reader.ExcelDataReader.getCellValue(ExcelDataReader.java:154) at com.excel.reader.ExcelDataReader.process(ExcelDataReader.java:118) at com.excel.reader.ExcelDataReader.main(ExcelDataReader.java:249) Exception in th