You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Patil Minal <Pa...@JohnDeere.com> on 2009/08/18 08:26:21 UTC

Green corner on storing number in text cell

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




RE: Antwort: RE: Green corner on storing number in text cell

Posted by Patil Minal <Pa...@JohnDeere.com>.
Hi,

In 'Export to Excel' option i.e. exporting to excel from html we have a solution over this excel error-checking issue.
Please go through below code:

<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40">

   <td height=20 width=20 mso-number-format:"000000000" x:num>
        <%=insertNumericSting()%>
   </td>

Above excerpt of code is from a jsp file which has its content-type set to excel. The highlighted property of td x:num which belongs to microsoft namespace when used gets the problem of green corner solved. But what do we have similar to this in POI.

- Minal.

-----Original Message-----
From: Patil Minal [mailto:PatilMinal@JohnDeere.com]
Sent: Wednesday, August 19, 2009 2:57 PM
To: 'POI Users List'
Subject: RE: Antwort: RE: Green corner on storing number in text cell


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: REINER_KUEHL@QVC.COM [mailto:REINER_KUEHL@QVC.COM]
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
reiner_kuehl@qvc.com


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 <Pa...@JohnDeere.com>
19.08.2009 11:02
Bitte antworten an
POI Users List <us...@poi.apache.org>


An
'POI Users List' <us...@poi.apache.org>
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:markbrdsly@tiscali.co.uk]
Sent: Tuesday, August 18, 2009 1:21 PM
To: user@poi.apache.org
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: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org





RE: Antwort: RE: Green corner on storing number in text cell

Posted by Patil Minal <Pa...@JohnDeere.com>.
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: REINER_KUEHL@QVC.COM [mailto:REINER_KUEHL@QVC.COM] 
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
reiner_kuehl@qvc.com


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 <Pa...@JohnDeere.com>
19.08.2009 11:02
Bitte antworten an
POI Users List <us...@poi.apache.org>


An
'POI Users List' <us...@poi.apache.org>
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:markbrdsly@tiscali.co.uk] 
Sent: Tuesday, August 18, 2009 1:21 PM
To: user@poi.apache.org
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: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Antwort: RE: Green corner on storing number in text cell

Posted by RE...@QVC.COM.
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
reiner_kuehl@qvc.com


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 <Pa...@JohnDeere.com> 
19.08.2009 11:02
Bitte antworten an
POI Users List <us...@poi.apache.org>


An
'POI Users List' <us...@poi.apache.org>
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:markbrdsly@tiscali.co.uk] 
Sent: Tuesday, August 18, 2009 1:21 PM
To: user@poi.apache.org
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: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org




RE: Green corner on storing number in text cell

Posted by Patil Minal <Pa...@JohnDeere.com>.
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:markbrdsly@tiscali.co.uk] 
Sent: Tuesday, August 18, 2009 1:21 PM
To: user@poi.apache.org
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: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Re: Green corner on storing number in text cell

Posted by MSB <ma...@tiscali.co.uk>.
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: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org