Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Data types not read correctly from Excel Post Reply Post New Topic
Author Message
vaibhav123
Newbie
Newbie
Avatar

Joined: 03 Nov 2009
Online Status: Offline
Posts: 19
Quote vaibhav123 Replybullet Topic: Data types not read correctly from Excel
     Posted: 02 Feb 2010 at 6:34am
Hello,

I have come across something which is rather weird. I have an excel sheet which I linked with Crystal. The issue that I am facing is that irrespective of the already defined data type in excel, Crystal seems to read it as String. So, basically, the field which is formatted as a number in excel is being read as a string. I am not sure if there is a way I can fix this problem?

Also, I am not sure what is causing this at the first place? Is it the the type of connection, I choose to link the excel sheet with crystal? There are a few types including Excel 3.0, Excel 4.0, Excel 5.0 and Excel 8.0. I am not sure how these aforementioned types are different?

Any help on this is highly appreciated.

Thanks,
-V
IP IP Logged
judylynn
Newbie
Newbie
Avatar

Joined: 17 Nov 2008
Location: United States
Online Status: Offline
Posts: 22
Quote judylynn Replybullet Posted: 02 Feb 2010 at 7:52am
I have also had this problem. I have a somewhat older Excel version and I always choose Excel 8 in the database expert. I solved the problem by selecting the column in Excel (use the controlkey to de-select the heading) and format it as a number. Do this even though Excel already says it's a number.
If that doesn't work, I prefer to put my data in an Access database rather than Excel. I seem to have less of those types of problems.
IP IP Logged
vaibhav123
Newbie
Newbie
Avatar

Joined: 03 Nov 2009
Online Status: Offline
Posts: 19
Quote vaibhav123 Replybullet Posted: 02 Feb 2010 at 9:32am
thanks for replying..

However, i found out a workaround too... just format the column every time as a number and either add or take off the decimal digits. I think Crystal recognizes better if a column has number with decimals. I am not sure, how good is this method, but its been working for me for sometime now.
-V
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum