Click here to Skip to main content
15,562,015 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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

"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[^]
 
Share this answer
 
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!

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900