How to change Excel data format

  • Thread starter Thread starter Li Pang
  • Start date Start date
L

Li Pang

I use sql to get the data from a Excel file. It works only
when the data within a column have the same data type. I'd
like to know how to change the data format for each column
(adding "'" for example) through whole data range? No VBA.

Thanks.
 
Hi Li,

I saw this IMEX =1 once, never used it.

"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\MyExcel.xls;Extended
Properties=""Excel 8.0;HDR=Yes;IMEX=1"""
"HDR=Yes;" indicates that the first row contains columnnames, not data
"IMEX=1;" tells the driver to always read "intermixed" data columns as text


I hope this helps?

Cor
 
Back
Top