Screen scraping datatable with empty value

Hi All,

Currently i had activity to do this :

  • Scraping datatable from standalone application (not browser)
  • The element is seperated with multiple space, so i have to using regex replace double caracther spaces " " with semicolon ";"
  • Generate output datatable based on semicolon ";"
  • write to excel

But for this case i had issue when i have empty data for column it will be shifted to the left

Expected output :
image

Output now :
image

Anyone know solution for my issue?

Regards,

@aliaga

You can do a validation of data and move the cells…looks like first two columns will have number and letters and third will have numbers fourth has date and 5 and 6 has number again…

After your separation check each cell using loop and move the data

Cheers

Hi @Anil_G,

Thankyou for your reply.

I understand your point, but there is a case when column no 2 is numeric only, so i’m not sure if can be applicable or not.

Or maybe can i use this logic?

  • got the datatable
  • foreach datatable{
  • check if last column value empty
  • if yes it will shift the data and add to the datarow
  • if no it will continue add the datarow
  • }

Regards,

@aliaga

Yes this also can be done…it totally depends on the each column validation

cheers

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.