Hello,
How to show image text into separate output using : (colon) as a separator
as attached image above i want Name and ABC as a separate output.
I converted that image into text but i want that separate output as above mentioned.
Thanks in advance
@abhay Read the text file, split with respect to new line, then u will get each line separately, split each line with respect to “:” then u will get Name and ABC separately likewise it repeat for all lines.
@Manjuts90 how can i split with respect to new line?
urStringvarible.Split({Environment.Newline},StringSplitOptions.RemoveEmptySpaces)
where usStringvariable is a string variable, which is the output of read text file activity.
Or
in other way u can store lines in array from text file using directly.
File.ReadAllLines(“ur file path”)
it will give array of lines as output.
@abhay check attached zip file meets your requriement
SplitTxt.zip (1.9 KB)
@Manjuts90 this give me error
it is not spaces, it is entries. After dot u will get that option check it once.
urStringvarible.Split({Environment.Newline},StringSplitOptions.RemoveEmptyEntries)
thanks @Manjuts90 got it…
RemoveEmptyEntries work instead of RemoveEmptySpace
@Manjuts90 @indra Now i want to write csv in that csv column name should be Name Add Phn and Gender and their data should be ABC PQR 123 Male
thank you @indra
@abhay After splitting each line with respect to “:” add arr(0) as column name and arr(1) to collection at the end of for u can use add data row activity for writing row to datatatable and later u can write datatable to csv or excel.
thank you @Manjuts90 its work perfectly now