I have a client who is incapable of formatting spreadsheets properly. I've asked them 10 times over to follow a sensible guideline (As in FORMAT THE COLUMNS WITH THE CORRECT DATATYPE) but in their lack of intelligence or professionalism or both, they just can't /won't do it.
I have an ODBC connection set up for the spreadsheets and pulls the data except for the columns that contain product counts or product prices. Unless I manually set the type for each of those columns to "Number" in Excel, the values appear null in the ASP page that displays the results.
Is it possible to write a SQL statement that will alter the datatype as it comes in? I don't care it if converts every column to a string as long as the ADODB.Recordset will display the values of all of the columns.
Code:
<%
Dim MM_SQLSource
MM_SQLSource = "SELECT * FROM [Inventory$]"
Set rsGetExcelInfo = Server.CreateObject("ADODB.Recordset")
rsGetExcelInfo.ActiveConnection = MM_Excel_Connect
rsGetExcelInfo.Source = MM_SQLSource
rsGetExcelInfo.CursorType = 0
rsGetExcelInfo.CursorLocation = 2
rsGetExcelInfo.LockType = 1
rsGetExcelInfo.Open()
%>