Actually the numbers which would be in the column are not of a particular 
format I mean the number of digits etc. And I don't think it would be wise to 
write a complex logic to create number format based on every input number.

-----Original Message-----
From: [email protected] [mailto:[email protected]] 
Sent: Wednesday, August 19, 2009 2:51 PM
To: POI Users List
Subject: Antwort: RE: Green corner on storing number in text cell

Hi Minal,

if you know when you write alpha numeric text and when a number, you can create 
a number format for the numbers which preserves leading zeros (hopefully all 
the numbers are formatted the same). Then you can do a
switch: if you have to write a number set the cell type to numeric and use a 
style with the number format.

We have a similar problem: we have a text field in the DB which we write into a 
HSSF cell (as text). But our users sometimes populate the field with numbers: 
These numbers produce the green corner warning in Excel. But since we have no 
business rules for the content of the field we cannot create a number format: 
we have simply no idea what the numbers look like. 
Thus we have to live with the green corners... 

Mit freundlichen Grüßen / Best regards
Reiner Kühl
__________________________________________________

Reiner Kühl
Application Developer
IS&T EAD

QVC Call Center GmbH & Co. KG
Lise-Meitner-Allee 1
44801 Bochum

Telefon
+49 (0) 234-9732-2866
Fax
+49 (0) 234-9732-44 2866
 
E-Mail
[email protected]


http://www.qvc.de


QVC - Ideen für mich!

Amtsgericht Düsseldorf: HRA 13610
Geschäftsführer der Komplementärin QVC Call Center Verwaltungs GmbH: Larry R. 
Hayes, Dr. Ulrich Flatten

Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen.
Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten 
haben, informieren Sie bitte sofort den Absender und vernichten Sie diese 
E-Mail.
Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser E-Mail ist nicht 
gestattet.

This e-mail may contain confidential and/or privileged information.
If you are not the intended recipient (or have received this e-mail in
error)
please notify the sender immediately and destroy this e-mail.
Any unauthorized copying, disclosure or distribution of the material in this 
e-mail is strictly forbidden.

P Please consider the environment before printing this e-mail




Patil Minal <[email protected]>
19.08.2009 11:02
Bitte antworten an
POI Users List <[email protected]>


An
'POI Users List' <[email protected]>
Kopie

Thema
RE: Green corner on storing number in text cell







Ok I have a problem. I have a column in my worksheet which may have number 
or alpha numeric text. Also the number may be prefixed with zeros which 
need to be preserved. So I formatted those cells as text. But I get the 
error of excel. Please can you suggest some workaround for this.

- Minal.

-----Original Message-----
From: MSB [mailto:[email protected]] 
Sent: Tuesday, August 18, 2009 1:21 PM
To: [email protected]
Subject: Re: Green corner on storing number in text cell


I could be wrong - and in fact quite often I am so treat this with caution 
- but I think I am correct in saying this has nothing to do with your 
worksheets but rather with the Excel application itself - POI cannot be 
used to alter the application's behaviour. It is Excel's error checking 
feature that is producing these little green triangles and the only way to 
prevent it from doing so - at least as far as I am aware - is to change a 
setting within Excel. How you do this depends on the version you are using 
- it used to be simply;

Tools>Options>Error Checking

Since Office 2007, things have got a little more complex, this page will 
explain the options to you;

http://support.microsoft.com/kb/291361

Yours

Mark B


Patil Minal wrote:
> 
> 
> Hi,
> 
> I need to store a number as text in a cell formatted as text. But I 
> get the green corner on doing so. Is there any solution to remove this 
> green corner, how to achieve this in POI?
> 
> 
> Minal Patil
> 
> 
> 
> 
> 

--
View this message in context: 
http://www.nabble.com/Green-corner-on-storing-number-in-text-cell-tp25019188p25020106.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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]




---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to