Computer Vision use in extracting PDF data in Excel

Hello Experts!

In need of your valuable suggestion,
I am using CV Screen scope and CV get text to fetch the required data from a PDF file and it is working well,but my concern is how I can put the data which I am trying to fetch, in excel sheet (Based on each column)

Above attached PDF is an example like I want to have delivery date, delivery time and Bill of landing as column and the data.

Waiting for your valuable suggestion.


1 Like


Are you trying to read data from PDF file and writing into Excel file ?

Hope these steps could help you resolve this
–once the pdf data is obtained from cv scope and activities store thm in different variables like str_deliverydate, str_deliverytime, str_billofloading
all of type string
–use a build datatable activity and create three columns like this
Delivery_Date, Delivery_Time, Bill_Of_Loading
all column of type string and get the output from this build datatable activity with the variable of type datatable named Final_dt
–use a add data row activity and mention the value in Arrayrow property of this activity inthe property panel like this
and mention the datatable input as Final_dt
–now use a write range workbook activity and mention the file path of the excel and sheetname, range as “” and datatable as Final_dt. Kindly enable the add headers property in the property panel as well

Thats all simple isn’t it
Kindly correct me if i m wrong
Cheers @Rahulsinha

Yes Buddy! :slight_smile:

1 Like

Hi Palaniyappan,
Please explain {Delivery_Date.ToString,Delivery_Time.ToString,Bill_Of_Loading.ToString} this once as how to write it in Arroyrow property :frowning:


usually we can pass the value to a datatable either as a row, or as a datatable so that we can merge or a range of row that can be merged
–here we have variable with values as individual , so we can go for the first one, as a row
–for that we got an activity called add data row with which we can add a row to a datatable either like a arrayrow or a datarow
–we dont have a datarow, so only mean is arrayrow…and as the name implies array row means we are passing a datarow as array of values, i.e., array of datarows
here we have three variables with values in it which can be passed to this array as a value
means we have three columns in the datatable as created with build datatable activity (steps mentioned in the previous comment)
so these three positions
Delivery_Date will go to first column as value
Delivery_Time will go to second column as value
Bill_Of_Loading will go to third column as value

.ToString is used to convert them as a string

Cheers @Rahulsinha

1 Like

Kindly remove the double quotes
Cheers @Rahulsinha

Getting below errors.


1 Like

Kindly take the cursor to this blue mark and we will be getting the error message
share that screenshot
Cheers @Rahulsinha

1 Like

Here we go

were the variables Delivery_Date. Delivery_Time and Bill_Of_Loading created
if created then go to variable panel and change the scope of those activities to whole sequence
Cheers @Rahulsinha

1 Like

It works :slight_smile:
Buddy last error is below

thats great
usually this error occurs when the variable in the activity where this error occurs, has no value in it
Make sure that the CV activities value is assigned to the variable used in the Add datarow activity and if they are assigned correctly check whether they have values in them before using this add datarow activity with a simple writeline activity and mention like this
if any value is missing it means the value is obtained by CV
and to avoid the above error even if there is no value fetched
use a if condition like this
Not String.IsNullOrEmpty(Delivery_Date) AND Not String.IsNullOrEmpty(Delivery_Time) AND Not String.IsNullOrEmpty(Bill_Of_Loading)
and if the above condition passes it will go to THEN part where we can place the add data row activity or it will else part where leave it empty without any activities

Cheers @Rahulsinha

1 Like

any issues still
were you able to get the output
Cheers @Rahulsinha

Trying Buddy! Will let you in process :slight_smile:

Cheers @Rahulsinha

Now this error :frowning:

Tried capturing text in all ways but unable to proceed

there must be two reason behind
Either the selector is not valid and this the element is not found and for that kindlycheck with the selector whether is in valid state or not
If not again select the element and try executing
And make sure that the dynamic part of selector is replaced with wildcards * which means the attributes value which gets changed from one to another replace it with * symbol
This must be due to that the cv activity and change scope is not within a attach browser (if a web browser is used) or within a attach window (if a desktop application is used)
So make sure that this scope is within either if this activities like attach browser or attach window activity

You were almost done
Kindly try this and let know for any queries or clarification
Cheers @Rahulsinha

Hi Palaniyappan,

even I thought the same but still I am getting the error as element not found, I am trying in all possible ways to capture that image but getting thee same error.


Hi Lakshman,

Please advise how a CV Get text works as I am unable to process with the image I am trying to process, getting below error.