Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Other Programming > VBScript
Password Reminder
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Display Modes
  #1 (permalink)  
Old April 11th, 2006, 06:32 AM
Registered User
Join Date: Apr 2006
Location: Pune, Maharastra, India.
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
Location: , , .
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

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 10:27 AM

All times are GMT -4. The time now is 10:27 PM.

Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.