Tech Support Guy banner
Status
Not open for further replies.

Getting a number string with commas - Excel 2013

839 views 2 replies 3 participants last post by  euUbsd36R 
#1 ·
I am trying to get a list of numbers that export from my program as one on each line into a text string with commas to paste into my online screen and get check images.

so...
12345
64789
32579
12590

becomes 12345,64789,32579,12590

Anyone know of an easy way to do that? I tried saving as csv and opening in notepad but notepad opens it looking like the top set and didn't put the commas.

Thanks
 
#2 ·
You question is not really clear enough... Are you exporting the numbers from an Excel spreadsheet? If so, then perhaps you could upload a sample spreadsheet and a sample file of how you want it to look when exported.
You might just have to change the output format from .csv to .txt

Otherwise, you used the word "program". Is this output from a program you have written? In that case, I would adjust the program to not output line feeds at the end of the print lines.
 
#3 ·
BratDawg,
A more flexible text editor, such as Notepad++, will easily replace formatting characters - such as the "new line" causing your list of numbers to appear as a table into one that appears like a string.

It requires replacing the "new line" characters with a comma character.

Here's how to do it in Notepad++:
  1. Under File, click New, then Copy your text on the new sheet,
  2. Under View, select, Show Symbol, Show End of Line - to display CR LF (representing the end of line characters, carriage return (CR), and line feed (LF).
  3. Under Search, Replace... is a dialog
    1. In the Replace Tab, be sure to click regular expressions,
    2. enter [\r\n]+ in the Find What box,
    3. in the Replace with box - a comma "," (without the double quotes).
The result should be a string formatted as you expect.
 
Status
Not open for further replies.
You have insufficient privileges to reply here.
Top