CSV Save As Format

  • Thread starter Thread starter Clark Murray
  • Start date Start date
C

Clark Murray

Is there a csv (or txt) Save As format in Excel that exports all non-numeric fields in quotes (not just the ones with spaces and/or commas) like MS Access does. I can't seem to find one.
 
Can you put the double quotes around numeric entries, too?

(It didn't bother excel when I re-imported, but it might make another program
burp.)

If yes, then maybe you could use a couple of helper cells:

I'd build a nice string in the first:

="@"&A1&"@,@"&B1&"@,@"&C1&"@"
(concatenates a1, b1, c1)

then use another formula that changes the @ to "'s.
=SUBSTITUTE(D1,"@","""")

Then I'd copy that column and paste into notepad and save from there.

You could write your own code if you wanted to:

I'd try to steal as much as possible from one of these samples:

Chip Pearson's:
http://www.cpearson.com/excel/imptext.htm

Earl Kiosterud's:
http://www.tushar-mehta.com/
Look for Text Write in the left hand frame.

J.E. McGimpsey's:
http://www.mcgimpsey.com/excel/textfiles.html

(You may want to try Earl's. It may be sufficient as is.)
 
Thanks. However, if there really isn't a format like this in Excel, it's
easier just to import the worksheet into Access and then re-export.

--
Best Regards,
Clark Murray
Dave Peterson said:
Can you put the double quotes around numeric entries, too?

(It didn't bother excel when I re-imported, but it might make another program
burp.)

If yes, then maybe you could use a couple of helper cells:

I'd build a nice string in the first:

="@"&A1&"@,@"&B1&"@,@"&C1&"@"
(concatenates a1, b1, c1)

then use another formula that changes the @ to "'s.
=SUBSTITUTE(D1,"@","""")

Then I'd copy that column and paste into notepad and save from there.

You could write your own code if you wanted to:

I'd try to steal as much as possible from one of these samples:

Chip Pearson's:
http://www.cpearson.com/excel/imptext.htm

Earl Kiosterud's:
http://www.tushar-mehta.com/
Look for Text Write in the left hand frame.

J.E. McGimpsey's:
http://www.mcgimpsey.com/excel/textfiles.html

(You may want to try Earl's. It may be sufficient as is.)
 
If you can't do it in excel, it ain't worth doing <vbg>.

I don't think that there's any built in way (in xl) of doing what you want.

Clark said:
Thanks. However, if there really isn't a format like this in Excel, it's
easier just to import the worksheet into Access and then re-export.
 
Back
Top