Must admit that I thought you would have done - too obvious really. Out of ideas for the moment then but I will see what I can find out later today when I have the chance to play wioth some code. If I manage to find out anyting, I will post to let you know.
Yours Mark B Princess-4 wrote: > > I have already tried all these combinations.I get error ehen i open the > file > Hepzibah > **Hope can be ignited by a spark of encouragement ***** > > > > On Fri, Jan 22, 2010 at 3:19 PM, MSB <[email protected]> wrote: > >> >> Have you tried >> >> this.styleKg.setDataFormat(wb.createDataFormat().getFormat("#,##000 >> \'kg\'")); >> >> or >> >> this.styleKg.setDataFormat(wb.createDataFormat().getFormat("#,##000 >> kg")); >> >> or even >> >> this.styleKg.setDataFormat(wb.createDataFormat().getFormat("#,##000kg")); >> >> just to see if the problem has to do with the single inverted commas >> surrounding the units symbol? Have no idea if this will help at all, >> sorry. >> >> Yours >> >> Mark B >> >> >> Princess-4 wrote: >> > >> > this.styleKg.setDataFormat(wb.createDataFormat().getFormat("#,##000 >> > 'kg'")); >> > >> > >> > is not setting the format in the cell with POI 2.5 .basically i want >> 1000 >> > Kg >> > to be written in the cell >> > along with the unit. >> > >> > The same user defined format works in Excel.. >> > >> > But to display % >> > this.stylePer.setDataFormat(wb.createDataFormat().getFormat("0.00%")); >> is >> > working >> > >> > thanks >> > >> > >> >> -- >> View this message in context: >> http://old.nabble.com/Units-to-be-set-through-getFormat%28%29-tp27271302p27273826.html >> Sent from the POI - User mailing list archive at Nabble.com. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] >> >> > > -- View this message in context: http://old.nabble.com/Units-to-be-set-through-getFormat%28%29-tp27271302p27284082.html Sent from the POI - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
