List Info

Thread: Bug on Cell.getType()




Bug on Cell.getType()
country flaguser name
Canada
2008-06-10 14:45:01

I think this is a bug on jexcelapi.

I set this particular cell to be of the type Text on an excel spreadsheet (right click -> Format Cell -> Text). The value of this cell is "2"

In my code, when I use the method Cell.getType() for this cell, the type I get is Number.

I also tested this setting the format to General. The result of getType was also Number.

It seems that the API is getting the type of the cell based on the contents and not the format. Is there a way around this?

Thanks,


Andre

__._,_.___
.

__,_._,___
RE: Bug on Cell.getType()
country flaguser name
United Kingdom
2008-06-10 14:58:56

Andre

 

The API returns the type based on the record type Excel saves.  The format you choose to display the number has no bearing on how Excel will save a numeric value.

Bill

 

From: JExcelApiyahoogroups.com [mailto:JExcelApiyahoogroups.com] On Behalf Of Andre Rubin
Sent: 10 June 2008 20:45
To: JExcelApiyahoogroups.com
Subject: [JExcelApi] Bug on Cell.getType()

 

I think this is a bug on jexcelapi.

I set this particular cell to be of the type Text on an excel spreadsheet (right click -> Format Cell -> Text). The value of this cell is "2"

In my code, when I use the method Cell.getType() for this cell, the type I get is Number.

I also tested this setting the format to General. The result of getType was also Number.

It seems that the API is getting the type of the cell based on the contents and not the format. Is there a way around this?

Thanks,


Andre

__._,_.___
.

__,_._,___
Re: Bug on Cell.getType()
country flaguser name
Canada
2008-06-10 15:22:00

Thanks for the fast reply.

So is there a way to get the user-defined format from the spreadsheet using the API? 

Andre

On Tue, Jun 10, 2008 at 12:58 PM, Bill Seddon < bill.seddonlyquidity.com">bill.seddonlyquidity.com> wrote:

Andre

 

The API returns the type based on the record type Excel saves.&nbsp; The format you choose to display the number has no bearing on how Excel will save a numeric value.

Bill

 

From: JExcelApi@yahoogroups.com" target="_blank">JExcelApiyahoogroups.com [mailto: JExcelApi@yahoogroups.com" target="_blank">JExcelApiyahoogroups.com] On Behalf Of Andre Rubin
Sent: 10 June 2008 20:45
To: JExcelApi@yahoogroups.com" target="_blank">JExcelApiyahoogroups.com
Subject: [JExcelApi] Bug on Cell.getType()

 ;

I think this is a bug on jexcelapi.

I set this particular cell to be of the type Text on an excel spreadsheet (right click -> Format Cell -> Text). The value of this cell is "2"

In my code, when I use the method Cell.getType() for this cell, the type I get is Number.

I also tested this setting the format to General. The result of getType was also Number.

It seems that the API is getting the type of the cell based on the contents and not the format. Is there a way around this?

Thanks,


Andre


__._,_.___
.

__,_._,___
[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )