I am extracting some text from PDF files using Google OCR but it is not giving accurate data.
Here, I need to fetch text from headers in PDF file and it is same for all pages in a file. So, i scanned all pages in PDF file and placed the text into excel file on column wise.
Currently I do not have access to UIPath Studio. But I have equivalent code in C#. Understand the below code and try to implement in the UIPath studio.
Before that load Column1 into DataTable. You can use the same following LINQ query in your program and just update the column name in the query.
var dt1 = new DataTable();
dt1.Columns.Add(“A”);
dt1.Rows.Add(“GOOD”);
dt1.Rows.Add(“NOT GOOD”);
dt1.Rows.Add(“GOOD”);
dt1.Rows.Add(“PERFECT”);
dt1.Rows.Add(“PERFECT”);
dt1.Rows.Add(“GOOD”);
var result = dt1.AsEnumerable()
.GroupBy(r => r.Field<string>("A"))
.Select(r => new
{
Str = r.Key,
Count = r.Count()
});
foreach (var item in result)
{
Console.WriteLine($"{item.Str} : {item.Count}");
}