ExtractMetadata Specifiaction to extract datatable from a terminal

Hi All,

I want to extract a table format from a terminal window, since data scraping doesn’t work on terminal I have tried to use Extract Structured Data Activity and I have no idea of how to specify xml string in ExtractMetadata field. The table format is dynamic in nature and I have no idea if this Extract Structured Data Activity works too.

Is there any other way I can do it. I have also tried the other method but I am facing this error :arrow_right: VisualBasicValue: Length cannot be less than zero.
Parameter name: length
The method I used is attached below:

image
image
image

Looking forward to your response.

Thanks and Regards,
Reema

In your condition, if “102 rows” is not found, IndexOf returns “-1”. That is why you are getting the error.

Please make your workflow robust like below -

index = tableSpace.IndexOf("102 rows")

if index > 0 Then
tableSpace.Substring(0,index) = "true"
Else
....
1 Like

@ReemaPriscilla

Your method is an good approach. We cant use Extract Structured Data in terminal, data scraping method uses Extract Structured Data activity indeed.

If possible can you share the text result of “Get Visible Text” activity here?

Hi @KarthikByggari,

Thank you for the response :slightly_smiling_face:. But my expectation of the code was to automatically scroll to check the word “102 rows”. The word was not found cause it is at the end of the terminal window (mutliple scrolls present).

regards,
Reema

I recommend you an another way.

Use Send Hot Keys Activity, Ctrl+A to select all the text, copy all the text and paste it to a notepad. Save the notepad file temporary and read the text from notepad.

Hi @ranjith,

Thank you for your response :slightly_smiling_face:. Get Text activitty is not working appropriate for the terminal window. I ain’t getting the complete output.

regards,
Reema

I tried since it is a terminal application control keys are not working.