How to delete rows in a text document

I have the following issue:

I have a text document that I need to transform into a data table. The problem is that the first two rows or lines contain unnecessary text for the brand and date.

How can I remove the text from these first two lines or, alternatively, omit it when generating my data table?

image

Hi, @alexis.mendoza.rpa

use .Skip(2) in your ReadLines or split text logic, then feed the rest to Generate Data Table

Hi,

Can you try the following expression?

strData = System.Text.RegularExpressions.Regex.Replace(strData,"^.*\n.*\n","")

(Delete first 2 lines)

OR

System.Text.RegularExpressions.Regex.Replace(strData,"^[\s\S]*(?=colum1)","")

(Delete from top to just before “column1”. )

Regards,

1 Like

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