Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Zane
 
Posts: n/a
Default prevent auto convert format

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
  #2   Report Post  
Jim Rech
 
Posts: n/a
Default

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
"Zane" wrote in message
...
|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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
CONVERT DATA TO CURRENCY FORMAT roy in sunbury Excel Discussion (Misc queries) 1 January 12th 05 03:12 AM
CONVERT 11/23/04 US DATE FORMAT TO EUROPEAN 23/11/04 FATE Roland Excel Discussion (Misc queries) 2 December 20th 04 10:19 PM
Time Format Auto Entry AM and PM BulaMan Excel Discussion (Misc queries) 1 December 15th 04 09:30 AM
prevent 4/5 in a cell automatically transfer to a date format kei Excel Discussion (Misc queries) 3 December 9th 04 11:52 AM
Help Q: Entering 7 p time format, does not convert to 19:00 Frank Kabel Excel Discussion (Misc queries) 0 December 7th 04 07:20 AM


All times are GMT +1. The time now is 07:28 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"