A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

CSV formatting issue



 
 
Thread Tools Display Modes
  #1  
Old May 19th, 2009, 07:04 PM posted to microsoft.public.excel.misc
sueasmith31
external usenet poster
 
Posts: 1
Default CSV formatting issue

I currently use Excel 2002 with SP3. I have a file I create in a worksheet
and have formatted a numeric field to be text so that I can maintain a 12
character string. I then "Save-As" a CSV file in order for it to be used in
another application. Up until 3 weeks ago, the formatting was correct - now
no matter what I do, when the "text column is converted to CSV, the column
converts to a "general" format and I lose my character string of 12 digits
(leading 0's).
Aside from having to add " " around the string - is there some other
technique I can use so that I am not manually adding all the quotes?
  #2  
Old May 19th, 2009, 08:00 PM posted to microsoft.public.excel.misc
David Biddulph
external usenet poster
 
Posts: 8,714
Default CSV formatting issue

Are you sure that you have lost the formatting is lost when you write to the
CSV? Have you tried looking at the CSV with something like Notepad after
the CSV has been written? I think you'll find that the CSV has the format
as you had previously displayed it in Excel.

My guess is that your problem is that you have used Excel to open the CSV,
and at that stage EXCEL has changed the formatting. Don't open a CSV with
Excel if you want the formatting to remain unchanged. [If you do want to
look at the CSV with Excel, don't use File/ Open but instead use Data/
Import External Data and specify the format of each column as text.]
--
David Biddulph

sueasmith31 wrote:
I currently use Excel 2002 with SP3. I have a file I create in a
worksheet and have formatted a numeric field to be text so that I can
maintain a 12 character string. I then "Save-As" a CSV file in order
for it to be used in another application. Up until 3 weeks ago, the
formatting was correct - now no matter what I do, when the "text
column is converted to CSV, the column converts to a "general" format
and I lose my character string of 12 digits (leading 0's).
Aside from having to add " " around the string - is there some other
technique I can use so that I am not manually adding all the quotes?



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:10 PM.


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