• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 165
  • Last Modified:

comma sep

Suppose I have a big list within a text file with out commas..
How will I give comma in between..

A
B
C
D


i do not have any application or nothing I can download for security reasons
0
tonydba
Asked:
tonydba
  • 3
  • 2
  • 2
  • +2
1 Solution
 
KimputerCommented:
For ease of you, you really need a program.
Option 1: Advanced editors like Notepad++. Use advanced find & replace:
find: \n\r
replace: ,

Option 2: Copy paste to Word. Record a macro, from the first line, press END, DEL, the "," key, CURSOR LEFT (it should jump to the next line, if not, use CURSOR DOWN, HOME)
Stop macro record, run macro record until the end.

Option 3: VB script (maybe I will provide code later if you really need it)
0
 
Dan CraciunIT ConsultantCommented:
You don't need a macro in Word.

Just press CTRL+H (or click on "Replace"), then type ^p in the find box and , in the replace box.
Or, if your file has Unix style endings, type ^l in the find box and , in the replace box.

HTH,
Dan
0
 
käµfm³d 👽Commented:
What programs (i.e. text editors) do you have access to?
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
Praveen VenuTechnical Project ManagerCommented:
Copy this to excel, in the second column add comma and drag to the end row.
Now copy back to notepad.
0
 
tonydbaAuthor Commented:
I tried with this but now working..
Advanced editors like Notepad++. Use advanced find & replace:
find: \n\r
replace: ,
0
 
Dan CraciunIT ConsultantCommented:
You have Unix style line endings.

In find you need: \n
replace with ,
0
 
KimputerCommented:
Sorry, my bad:
it's: \r\n
(But you have to set search mode to Extended, it's in the same window left bottom)
0
 
Dan CraciunIT ConsultantCommented:
To see the kind of line endings you have, go to View->Show symbol->Show end of line.
notepad    replace
0
 
tonydbaAuthor Commented:
tried with \n
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

  • 3
  • 2
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now