String manipulation of string to data table

Hi, i am extracting a text from an application using get text activity in the form of string in the below format
example:
EGM
Whole Structure
Load Model
Primary load

I need to convert this string into a data table. The text will vary every time.

Can you help me achieve this?

@RACHEL_PAUL

Use generate datatable from text activity

Hi @RACHEL_PAUL

Try this:

dtExtractedText = (From line In YourStringVariable.Split({Environment.NewLine}, StringSplitOptions.RemoveEmptyEntries)
                   Select dtExtractedText.Rows.Add(line)).CopyToDataTable()

Hope it helps!!

Hi @RACHEL_PAUL

Try this

Regards,

Hi @RACHEL_PAUL

Use Generate datatable from text activity .
Use the Seperator as newline

Got it the output.

Thanks so much!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.