• All Purchases made this month instantly go into the draw to win a USD $ 200.00 credit to your HoP account.

Forums > Help! > Please Help, problem with cellType

Login/Join to Participate


Member Since: 22nd Feb 2006
Total posts: 1
Posted:Hello Friends,
I am new to Poi world. I am facing one problem.

My requirement is that I want a excel sheet in which format type of cells of first column should always be a Text. For other columns the format type may be general or numeric.
Why I require first columns format type as text, because when ever user is entering long number in excel it automatically converts that to scientific notation. Like if I entered value 123456789012 in cell it automatically becomes 1.23457E+11. I was programmatically creating Excel by using Poi.

I dont want such behavior at least in first column of excel sheet. To avoid this, what I have done is instead of dynamically generating excel sheet I am keeping the predefined excel file and made its first columns property as a Text. This approach is working fine for all cells in the first column except in which I am adding some value dynamically through program. Its type automatically becomes General from Text. But the cells in the first column which are empty are still showing me the property type as Text.
To overcome this I have used following code,

HSSFCellStyle cellStyle = cell.getCellStyle();

And for other cells in other column I am again setting type as cell.setCellType(CELL_TYPE_NUMERIC);

But what I observed is that now all cells type becomes Text. If I dont use setDataFormat for first column and if only use setCellType, its type is not changing to text it remains to General only. I am using 2.5 version of Poi.

Can you please help me out from this problem?

Thanks and Regards,
Sachin Dare.


Location: Oregon, USA
Member Since: 2nd Sep 2005
Total posts: 577
3 bt weave?

No.. wait, I know the answer to this..



You may want to look into the site a little more before posting. You may want to research who you are asking before you ask. You also may want to go back to your search engine and continue your search.

Good luck, you're in the wrong place. This poi is at least at version aught'6.

Definition of poi- A Hawaiian food made from the tuber of the taro that is cooked, pounded to a paste, and fermented.

Ahnold discussing poi - "It is naht a toober!"


Carpal \'Tunnel
Location: Europe,Scotland,Both
Member Since: 5th Nov 2001
Total posts: 3749
Posted:LOL ubblol

thats the trouble with the internet, they let anyone on here (unless your chineeze)

This is a post by tom, all spelling is deleberate
-><- Kallisti

Location: uk
Member Since: 27th May 2004
Total posts: 327
Posted:You might want to try Jakarta POI 2.5.1, just a thought, or perhaps poi-3.0-alpha1.



HOP's glowstick ambassador!!
Location: Bay Area, California
Member Since: 16th Aug 2005
Total posts: 128
Posted:???? huh? umm

maybe if you lit the annoying column cells on fire?

missegyptology: "I just remember beingall off balance and unicycling really fast down to campus and the arabic was all blurred on the page"

^When Linz pulls an all nighter before Arabic class^

flash fire
flash fire

Sporadically Prodigal
Location: Sydney, NSW, Australia
Member Since: 25th Jan 2001
Total posts: 2758
Posted:Different sort of poi. See our home page, and you'll soon realise that.

HoP Posting Guidelines
Is it the Truth?
Is it Fair to all concerned?
Will it build Goodwill and Better Friendships?
Will it be Beneficial to all concerned?
If you can answer YES to these 4 questions then you may post a reply.

Similar Topics

Using the keywords [problem celltype] we found the following similar topics.
1. Learn > Cartoons, Fun, Jokes > Pictures, Cartoons, Meme > The New 2 Person Hoop, only has one problem *help/resource
2. Forums > Please Help, problem with cellType [5 replies]
3. Forums > Board 'quote' function problem [9 replies]
4. Forums > Wick problem [1 reply]
5. Forums > 'nother small problem [31 replies]

     Show more..