Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Lee
 
Posts: n/a
Default CSV and Trailing Commas

I have a file that I create in Excel and save as CSV. It contains thousands
of rows and each row can end in a different column, so there are many rows
that have trailing commas that need to be removed.

I open the file in Word and run a macro where it replaces ",^p" with "^p" to
remove the commas and leave a paragraph marker at the end of each line.

The macro corrects 99% of the problem; however, it leaves random rows with
trailing commas. This forces visual review of the file to find these rows
and remove the commas manually. If I try to do a find and replace after
running the macro, Word doesn't recognize a ",^p" within the file, even
though I can turn on display of non-printable characters and see the comma
followed by the paragraph marker in each of these rows.

Any ideas on why it doesn't recognize some of these rows?

I wasn't sure to post this in Excel or Word since I can't figure out where
the problem originates.

Thanks for any help!

--
Lee Kirts
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Greg
 
Posts: n/a
Default CSV and Trailing Commas

This might help:
http://gregmaxey.mvps.org/Clean_Up_Text.htm

Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:43 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"