G
Guest
Hi,
I have an XLS that I am looking to open in a web form and grab it's information into a Dataset. I have been able to do so but am having trouble with Zip Codes. When the Zip Code column in the XLS is formatted as "Special--Zip Code" the ADO.NET provider interprets it as a floating point number for some reason (so the zip code 07039 is read as 7039.0). This occurs both with SQL Server 2000's DTS Import Wizard and ADO.NET from a web form. ADO.NET reads the zip code as a floating point number and not as a string regardless of the IMEX value in the connection string (0, 1, or 2).
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\XLS\People.xls;Extended Properties='Excel 8.0;IMEX=1'
How do I tell ADO.NET to treat that column as a string and not a float? I am not able to change the XLS since I am building an automatic XLS parser. Any suggestions would be appreciated! Thanks!
I have an XLS that I am looking to open in a web form and grab it's information into a Dataset. I have been able to do so but am having trouble with Zip Codes. When the Zip Code column in the XLS is formatted as "Special--Zip Code" the ADO.NET provider interprets it as a floating point number for some reason (so the zip code 07039 is read as 7039.0). This occurs both with SQL Server 2000's DTS Import Wizard and ADO.NET from a web form. ADO.NET reads the zip code as a floating point number and not as a string regardless of the IMEX value in the connection string (0, 1, or 2).
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\XLS\People.xls;Extended Properties='Excel 8.0;IMEX=1'
How do I tell ADO.NET to treat that column as a string and not a float? I am not able to change the XLS since I am building an automatic XLS parser. Any suggestions would be appreciated! Thanks!