It's calling them RK if they are 1, 2, 3, 4, 5 (integer-appearing) and LABELSST if they are 1.21, 3.001, 5.66 (float-appearing). The "format" selected in excel is "Text", but I guess it's really variant.
The problem is that 1 comes back as 1.0 because that's how doubles are converted to string - the thing is, 1.0 and 1 are both valid and entirely different values. It would be helpful if POI could at least determine whether or not the value is an integer and give me the option of obtaining it as a long, as opposed to double only. I guess my only choice is to have people put stuff in with the "`" in front... that seems to convince excel the value isn't a number so I get labelsst all the way thru. --- "Andrew C. Oliver" <[EMAIL PROTECTED]> wrote: > Are you sure they *aren't* numbers? If Excel writes > them as numbers, > POI will insist they > are numbers. > > run "java org.apache.poi.hssf.dev.BiffViewer > myfile.xls >output.foo" > with the POI jars in your classpath. > See if the cells are represented by "LABELSST" or > "STRING", or if its > "MULRK", "RK", "NUMBER". > If it is not what you expect, blame Excel, not POI > and convert them to > strings if you like. > > Often the GUI shows us something different then what > is really happening. > > -Andy > > Troy Motte wrote: > > >I forgot to mention: the strings look like numbers, > >for example, "13", "12", whatever. POI insists that > >the cells must be numbers, no matter what. > > > >am using excel 2000 9.0.2720 > >am using poi version 1.5.1 apparently... > > jakarta-poi-1.5.1-final-20020625.jar > > > >the data is kind of private but if you really need > i > >can probably make a spreadsheet of similar content. > >lemme know. > > > >--- [EMAIL PROTECTED] wrote: > > > > > >>Hi Troy, > >> > >>I've been reading strings without any fuss. Do > you > >>have an example xls > >>spreadsheet and some code to illustrate your > >>frustrations? > >> > >>-Jeff > >> > >> > >> > >>>I am encountering a great deal of frustration > with > >>>HSSFCell, which insists on preventing me from > >>> > >>> > >>getting > >> > >> > >>>the actual string contents of a cell, even when I > >>>format the cells as text in excel. Why is this > >>> > >>> > >>> > >>>__________________________________________________ > >>>Do You Yahoo!? > >>>HotJobs - Search Thousands of New Jobs > >>>http://www.hotjobs.com > >>> > >>>-- > >>>To unsubscribe, e-mail: > >>><mailto:[EMAIL PROTECTED]> > >>> > >>> > >>For additional > >> > >> > >>>commands, e-mail: > >>> > >>> > >><mailto:[EMAIL PROTECTED]> > >> > >> > >> > >> > >>-- > >>To unsubscribe, e-mail: > >><mailto:[EMAIL PROTECTED]> > >>For additional commands, e-mail: > >><mailto:[EMAIL PROTECTED]> > >> > >> > >> > > > > > >__________________________________________________ > >Do You Yahoo!? > >HotJobs - Search Thousands of New Jobs > >http://www.hotjobs.com > > > >-- > >To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > >For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > > > > > > > > > > > > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > __________________________________________________ Do You Yahoo!? HotJobs - Search Thousands of New Jobs http://www.hotjobs.com -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
