I have a huge text file having rows greater than 11L, i need to search for a value in a text file , if text is present , pick the matched row and add in another excel file.
What i tried is converting the text file to Datatable using generate Datatable but there is a size limit and i get the below error"
Write range: Row Number must be between 1 and 1048576"
Read the text file and store in string variable str_var
2.Now use below linq query
str_output =String.Join(Environment.NewLine, Split(str_input,Environment.NewLine).Where(Function(e) e.ToString.Contains(input_value)).ToArray)
[input_value is the input value u need to check in text file]
Now use the str_output in generate datatable to generate the datatable and save in excel
Hope the logic helps you
Regards,
Nived N
Happy Automation