prevent auto convert format

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I use program language dump a table in database to a csv file, some fields'
data type are "char";however,it's comprised of numeral, like "06885341".when
I open the csv file with excel, the "0" in the front of string disappeared.
How can I prevent it happen?
 
Excel will always automatically convert numeric looking data to true numbers
when you open a CSV file. To stop it you must change the file's extension
to something else, like TXT. Then when you open the file in Excel the Text
Import Wizard will start up automatically. Use that to indicate the numeric
fields that should be treated as Text.

--
Jim Rech
Excel MVP
|I use program language dump a table in database to a csv file, some fields'
| data type are "char";however,it's comprised of numeral, like
"06885341".when
| I open the csv file with excel, the "0" in the front of string
disappeared.
| How can I prevent it happen?
| --
| Zane
 

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