Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CSV collum formatting problem - Excel 2002

Status
Not open for further replies.

Hammertime

Technical User
Jan 20, 2003
128
GB
Hi guys,

A user has sent me a .csv file contating phone/fax numbers. Here are some examples:

31612345678
447768000000

Trouble is, anything starting with a 4 is displayed like this: (example)

4.42072E+11

Obviously I have tried formatting the collums to 0 decimal place however when you try and save changes a warning message appears saying that the file may contain features that are no compatible with CSV. Do you want to keep the workbook in this format? I have tried all options, however, it always reverts back to displaying the numbers as shown in the example (4.42072E+11).

The user needs it be a CSV file, it can't be saved as anything else. I have tried formatting the cells using percentages and currency and they work. It just won't work using numbers!

Any ideas?

Cheers,

Hammertime

-----------------------------
Write down the problem
Think real hard
Write down the answer
 
Change the extension of the file to .txt instead of .csv and then open in Excel. the text import wizard willkick in and you will be able to specify text for individual columns within the wizard.

Regards
Ken..............

----------------------------------------------------------------------------
[peace]It's easier to beg forgiveness than ask permission[2thumbsup]

----------------------------------------------------------------------------
 
I just tested this. And by DEFAULT I get the same result.

However, I then changed the column format (RIGHT CLICK, FORMAT CELLS) to NUMBER with 0 (zero) decimal places and NO thousands separator.

I was able to save the file as a CSV file and received the same "warning" but the file saved correctly.

-- Jason
"It's Just Ones and Zeros
 
By default you will get the same result which is why I was very specific about using one of the format options within the wizard to ensure you what got what you wanted. Given that your examples left it unclear as to whether or not there were any leading 0s that needed preserving, Text was the obvious format to choose.

Either way as long as you got what you needed then that's what counts.

Regards
Ken.................

----------------------------------------------------------------------------
[peace]It's easier to beg forgiveness than ask permission[2thumbsup]

----------------------------------------------------------------------------
 
Ken -- My POST was in response to the original question.

I think you and I probably replied at about the same time.

-- Jason
"It's Just Ones and Zeros
 
LOL - Oops - Apologies :)

----------------------------------------------------------------------------
[peace]It's easier to beg forgiveness than ask permission[2thumbsup]

----------------------------------------------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top