Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Other Programming > VBScript
VBScript For questions and discussions related to VBScript.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VBScript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old April 11th, 2006, 06:32 AM
Registered User
Join Date: Apr 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Java solution Read Mixed data columns from excel.

Hi Experts,

I am facing a problem in reading mixed datatypes from Excel files.
If a Column Datatype is Varchar but it has number stored in it,it fails to read those numbers.
I tried for IMEX=1 in the Connection String but it is not workiing .Client should be unaware of any DSN name ,so I hv used dynamic DSN.Plz give the proper syntax for that.
My present connection String is ::
String fileName = "MyXLS";

conn = DriverManager.getConnection("jdbc:odbc:Driver={Mic rosoft Excel Driver (*.xls)};DBQ=E:\\Pranjal\\DMT\\SourceXLS\\Approved Version\\"+fileName+".xls;DriverID=22;Extended Properties=’Excel 8.0;HDR=YES;IMEX=1';READONLY=false","","");

Moreover, I m successfull in this by using the following query.But my requirement is get ting mixed data types only through connection String.
Using a Select query below solves my problem but I want the same output using "Connection String" only.

"SELECT * FROM [Excel 8.0;HDR=YES;IMEX=1;Database=E:\\Pranjal\\DMT\\Sour ceXLS\\ApprovedVersion\\MyXlS.xls].[Issue 10 Schedule$];";

Thanks in Advance


Pranjal Dutta
Reply With Quote
  #2 (permalink)  
Old March 19th, 2007, 12:29 PM
Registered User
Join Date: Mar 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts

did you ever find a suitable answer for this?

I'm experiencing the exact same thing - having gone from the one method to the other -


Reply With Quote

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to read data from an excel file diegoblin Beginning VB 6 6 August 31st, 2009 11:04 PM
Read data from Ms Excel 2007 senpark15 C# 2005 3 June 21st, 2008 02:35 AM
VBA Code to read the structure & data of an excel alam1 Excel VBA 0 April 24th, 2007 11:39 PM
how to read data from sybase to excel thillaiarasu SQL Language 2 April 20th, 2007 01:34 AM
Read Data from Excel File kiwibey ASP.NET 2.0 Professional 1 December 5th, 2006 11:27 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.