Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Cell format on reading .csv file

I have a .csv file where fields may have value "01234".

When I read this file into Excel, I want the cell to be formatted as text
(so the 0 is retained). By default Excel formats as numeric and loses the 0.

There is an alternative where I can rename the file as .txt and use the
wizard, but I want to see if there is a simpler alternative.

I have tried prefixing the field with "'" character, but that resyults in
the value "101234" in the cell.

Any ideas?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default Cell format on reading .csv file

You dont need to rename the file instead in 2007 from menu DataFrom Text and
in 2003 from menu DataImport External DataImport Data select the .csv file
to be opened and then follow ..the Wizard.

If this post helps click Yes
---------------
Jacob Skaria


"sdawson" wrote:

I have a .csv file where fields may have value "01234".

When I read this file into Excel, I want the cell to be formatted as text
(so the 0 is retained). By default Excel formats as numeric and loses the 0.

There is an alternative where I can rename the file as .txt and use the
wizard, but I want to see if there is a simpler alternative.

I have tried prefixing the field with "'" character, but that resyults in
the value "101234" in the cell.

Any ideas?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Cell format on reading .csv file

Thanks Jacob - just found that one as well; but is there nothng I can do to
the field in the csv to make Excel automatically interpret as text?

If I type directly into the cell, I can force Excel to intepret as text by
prefixing with "'". I was hoping for something similar I can use fo the file.

"Jacob Skaria" wrote:

You dont need to rename the file instead in 2007 from menu DataFrom Text and
in 2003 from menu DataImport External DataImport Data select the .csv file
to be opened and then follow ..the Wizard.

If this post helps click Yes
---------------
Jacob Skaria


"sdawson" wrote:

I have a .csv file where fields may have value "01234".

When I read this file into Excel, I want the cell to be formatted as text
(so the 0 is retained). By default Excel formats as numeric and loses the 0.

There is an alternative where I can rename the file as .txt and use the
wizard, but I want to see if there is a simpler alternative.

I have tried prefixing the field with "'" character, but that resyults in
the value "101234" in the cell.

Any ideas?

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default Cell format on reading .csv file

Sorry, you will need to use the wizard anyway.

If this post helps click Yes
---------------
Jacob Skaria


"sdawson" wrote:

Thanks Jacob - just found that one as well; but is there nothng I can do to
the field in the csv to make Excel automatically interpret as text?

If I type directly into the cell, I can force Excel to intepret as text by
prefixing with "'". I was hoping for something similar I can use fo the file.

"Jacob Skaria" wrote:

You dont need to rename the file instead in 2007 from menu DataFrom Text and
in 2003 from menu DataImport External DataImport Data select the .csv file
to be opened and then follow ..the Wizard.

If this post helps click Yes
---------------
Jacob Skaria


"sdawson" wrote:

I have a .csv file where fields may have value "01234".

When I read this file into Excel, I want the cell to be formatted as text
(so the 0 is retained). By default Excel formats as numeric and loses the 0.

There is an alternative where I can rename the file as .txt and use the
wizard, but I want to see if there is a simpler alternative.

I have tried prefixing the field with "'" character, but that resyults in
the value "101234" in the cell.

Any ideas?

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
Reading from a text file Jeff Excel Discussion (Misc queries) 1 November 8th 06 08:47 PM
reading from another file and pasting to current file, "combobox" Darius New Users to Excel 1 September 26th 05 07:13 AM
Reading a text file ? WTG Excel Worksheet Functions 2 February 22nd 05 01:29 AM
Reading a text file WTG Excel Discussion (Misc queries) 2 February 22nd 05 01:27 AM
Reading from a closed file. aking1987 Excel Worksheet Functions 1 November 15th 04 03:48 PM


All times are GMT +1. The time now is 09:07 PM.

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"