This is Tamil Web portal having Tamil sangam literature content, news content from all Tamil newspapers, Tamil Search engine, a one stop place for all Tamil Content
http://www.searchko.in/
Tuesday, July 27, 2010
Excel Column Data Type Issues

Found some weird thing in Excel 2003 (i’m not sure about 2007 or 2010) when you have mixed data type in a sheet as like below and if you try to read the cell values programmatically by using any excel specific data provider then the date value at “A11″ will become a Julian date value (numeric) and decimal value at “B11″ become a date!
Tried to get some help from Google but no luck. Customer was running behind me to resolve this issue but the mystery continues for a day. At last, after spending 3 to 4 hours of research, found a peculiar thing and that is
“If there is a mixed data type values in an excel sheet column then the data type for cell value starts from 11th row onward will be determined based on the data type of last available value up to the 10th row”…hmm this is my inference and kudos to me
As given in the above sample data (I’m sorry, I don’t know how to explain and so I will use the above sample to make it clear) the last value with in the range of 10th row is numeric (A4=210.3) and therefore the date value at A11 will be converted as numeric value. I don’t know how this conversion is happened and I’m assuming that it could be the excel design (some one can help to find out).
If you take the second column, the last available value with in the range of 10th row is date (B7=9/10/2009) and therefore the value at B11 will be converted as date as supposed to be a numeric value.
I changed my logic little bit by considering this scenario and after that it was working without any issue.
Thought of sharing this to anyone come across the same issue during custom ETL development…Happy architecting and coding.
Universal Thought
Today, my eldest kid asked me a question, "What is Space?....spontaneously my younger daughter replied her that "It's a key in laptop" :-)
My elder got angry and i can't control my laughing. She then explained me about a Kid science TV program which explained how to measure the space between two stars in terms of Light Years.
I tried to explain her about the Space, Measuring Space Distance with light years, Planets, Stars and our universe with the understanding of my own but she couldn't get convinced. Again, my younger daughter, spontaneously suggested us to "Google" for finding out correct answers.
Almost we spent 3 hours for browsing many cool sites and links which explained all the nut and bolts of our universe and i learned lot which i never learned or heard before...
Moral is..Listen to your kids and you can learn lot of good things from them either directly or indirectly.
My elder got angry and i can't control my laughing. She then explained me about a Kid science TV program which explained how to measure the space between two stars in terms of Light Years.
I tried to explain her about the Space, Measuring Space Distance with light years, Planets, Stars and our universe with the understanding of my own but she couldn't get convinced. Again, my younger daughter, spontaneously suggested us to "Google" for finding out correct answers.
Almost we spent 3 hours for browsing many cool sites and links which explained all the nut and bolts of our universe and i learned lot which i never learned or heard before...
Moral is..Listen to your kids and you can learn lot of good things from them either directly or indirectly.
Subscribe to:
Posts (Atom)