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
 
Hi LI

DAO and a recordset?

Is this VB.net with that is more usual OleDB and a dataset.

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top