Skip to main content
1-Visitor
January 27, 2019
Solved

Text in columns

  • January 27, 2019
  • 3 replies
  • 2094 views

Hi to all.

I need to generate a routine that separates into columns texts that contain words separated by a comma "," as shown in the image.

EXAMPLE_BPP_01.PNG

Is this possible? Thanks in advance

Best answer by LucMeekes

I thought I'd better try it out:

LM_20190127_ReadCSV.png

Prime 3.1 file attached.

Success!

Luc:

 

3 replies

23-Emerald I
January 27, 2019

@BPP wrote:

Hi to all.

I need to generate a routine that separates into columns texts that contain words separated by a comma "," as shown in the image.

EXAMPLE_BPP_01.PNG

Is this possible? Thanks in advance


The answer is yes, although it may be more challenging in Mathcad than some other programs.  If you have to do this only a few times (and can allow a "manual" method) I'd suggest (in Prime) an EXCEL component:

  • Input variable for DATA,
  • Open EXCEL, text to column with coma delimiter
  • Output variable from EXCEL

This begs the question:  Why are you using Mathcad to manipulate text?

23-Emerald IV
January 27, 2019

What's wrong with using READCSV ?     (Read Comma Separated Values)

Otherwise READTEXT could be your friend.

 

Success!
Luc

LucMeekes23-Emerald IVAnswer
23-Emerald IV
January 27, 2019

I thought I'd better try it out:

LM_20190127_ReadCSV.png

Prime 3.1 file attached.

Success!

Luc:

 

BPP1-VisitorAuthor
1-Visitor
January 27, 2019

Normally to manipulate text I use excel, but I had doubts if there was a way to do it directly in mathcad, exactly as LucMeekes proposes, with READCSV, I did not know that command.
Thank you very much for the help.