Re: 返: The CellType of a cell which is set to String

2016-08-19 Thread Javen O'Neal
I had some time and wrote the unit test and patch. https://bz.apache.org/bugzilla/show_bug.cgi?id=60025 On Fri, Aug 19, 2016 at 8:31 AM, Javen O'Neal wrote: > https://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/usermodel/DataFormatter.java?revision=1753122&view=markup#l897 > > Look

Re: 返: The CellType of a cell which is set to String

2016-08-19 Thread Javen O'Neal
https://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/usermodel/DataFormatter.java?revision=1753122&view=markup#l897 Looks like it isn't being uppercased. String.valueOf(false) -> "false" Do you want to open a bug at https://bz.apache.org/bugzilla and submit a patch with a unit test?

Re: 返: The CellType of a cell which is set to String

2016-08-19 Thread Young
If I use the default format of the cell(Standard) and type 'FALSE' in this cell, then I get the value 'false' in the cell by using formatCellValue method. Actually, I hope that I can get the value 'FALSE', not lowercase 'false'. Could I achieve this by using DataFormatter? On 2016-08-19 10:48 (+

Re: 返: The CellType of a cell which is set to String

2016-08-18 Thread Javen O'Neal
Yes. DataFormatter does what you want: get the string representation of the cell contents (numeric, date, string, boolean, blank, error, formula) On Aug 18, 2016 18:54, "陈 杨阳" wrote: > Actually, I want to get the value in cells and change them to String in > Java.(numeric -> String, string -> St

返: The CellType of a cell which is set to String

2016-08-18 Thread 陈 杨阳
Actually, I want to get the value in cells and change them to String in Java.(numeric -> String, string -> String, and so on). Sometimes, I'm not sure what CellType it is. So I want to know the CellType at first, and then I can convert them to String. As you said, I can directly use DataFormatte