Click here to Skip to main content
14,426,390 members
Rate this:
Please Sign up or sign in to vote.
See more:
insert  INTO tblcharges select * FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'Excel 3.0;imex=1;hdr=yes;Database=C:\ss1.xls', 'select * from [sheet1$]')

what does the 'imex' mean in the query?
Posted
Updated 27-Apr-11 19:21pm
v2

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

"IMEX=1;" tells the driver to always read "intermixed" (numbers, dates, strings etc) data columns as text. Note that this option might affect excel sheet write access negative.
Connection strings for Excel[^]
   
Comments
Tarakeshwar Reddy 28-Apr-11 0:33am
   
Upvoted to counter the 1 vote. Sheesh, some people do not have the courtsey to tell why they down voted an answer.
walterhevedeich 28-Apr-11 0:36am
   
Thanks man. I agree, and I don't understand as well why it was downvoted. Well, we just have to accept that idiots do exist. :)
Abhinav S 28-Apr-11 0:40am
   
I voted 5. Funny thing - the OP asked the same question again and I posted a similar answer without knowing he was repeating the question). Crazy!
walterhevedeich 28-Apr-11 0:46am
   
Thanks.

Abhinav S wrote: Crazy!

Not really, you're actually doing a good job in answering the question. The problem is he's not doing his part on how to post questions properly. :)
Sandeep Mewara 28-Apr-11 0:48am
   
My 5! No idea how/why it was downvoted!
walterhevedeich 28-Apr-11 0:55am
   
Thanks Sandeep. Must be the work of a troll perhaps? :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100