Print Page | Close Window

Linking Excel to SQL Tables - Types Not Compatible

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Data Connectivity
Forum Discription: How to connect to data sources and export reports
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=3774
Printed Date: 28 Apr 2024 at 9:02pm


Topic: Linking Excel to SQL Tables - Types Not Compatible
Posted By: RompinRonny
Subject: Linking Excel to SQL Tables - Types Not Compatible
Date Posted: 22 Jul 2008 at 12:11pm
Hello All,
 
I am trying to run a CR XI report using an Excel 2003 spreadsheet for data selection in several SQL tables.  When I try to link the column CTN in the spreadsheet to an SQL table field called IN_NUM, I get the "Data types are not compatible" error message (field IN_NUM is numeric).  I have reformatted the column to be numeric, but it still won't work - CR sees the column as a string rather than numeric.  Yet other columns in the spreadsheet, formatted as "General" in Excel, are shown as numeric in CR??

Does anyone have any suggestions on how to fix this?  I had this working a while ago, but it seemed to be hit and miss - it would work sometimes, and not work other times.

Any suggestions are much appreciated.
Regards,
Rompinronny


-------------
In the beginning, the Universe was created. This made a lot of people angry, and has been widely regarded as a bad idea.



Replies:
Posted By: RompinRonny
Date Posted: 22 Jul 2008 at 1:06pm
Hello again,
 
I found the problem and the solution - even though the cells were formatted as numeric, each cell in the column CTN had a warning in the cell:  "Number stored as text".  I converted all the cells in this column to Number by using the instructions in Excel and now I can link my spreadsheet to the SQL table field.
FYI. 


-------------
In the beginning, the Universe was created. This made a lot of people angry, and has been widely regarded as a bad idea.



Print Page | Close Window