Bug when replace in large string

Hello,
I have a large txt file. I need to read it in order to convert to datatable, when doing a replace string it gives me the following

Job stopped with an unexpected exit code: 0xE0434352

System.Exception: Job stopped with an unexpected exit code: 0xE0434352
can anyone help me please

did you use the read text File activity?

Give a try on using

strFileText = File.ReadAllText(YourFullFilePath)

yes it reads the file completly. and stores in a variable. then I use replace “|” to “,” to create the csv file but it gives back that error in that activity

please be more specific on the it

This is the sequence:
image
It fails on the third activity.

We assume that in third it will split the text on Environment.NewLine, right?

As an Alternate you can try

Assign Activity:
arrLines = File.ReadAllLines(YourFullFilePath) - returns a string array

Assign Activity
We dont know what was done in your second Assign, But can do:
arrLines = arrLines.Function (x) DoSomethingWith-WhereXReprendsAllLoopedLineStrings).toArray

Assign Activity:
arrLines = arrLines.Select(Function (x) x.Replace(…)).ToArray

[HowTo] LINQ (VB.Net) Learning Catalogue - Help / Something Else - UiPath Community Forum

You can use the Generate Data Table activity to convert it to a datatable, without replacing the | character. You can tell it | is the delimiter.

Then you can write the datatable to CSV.

Hi @Liliana_Novais

Try testing your code with a smaller text file to see if the issue persists. This can help isolate the problem and determine if it’s related to the file size or the code itself.

Thanks!!

It is the size. I tested with a smaller. I am going to use powerquery to solve this issue