When I try to extract data using data scraping, I get to see in the Extract Wizard but when I write to CSV, the file is empty

Hi Team,

When I try to do data scraping to extract the structured data and when I try to identify the elements, I am able to see the column data for all the columns I tried but when I write it to CSV, the file is empty. Any idea on why this is happening? I am using the ExtractDataTable.

Thanks.

Hello there,
Can you attach screenshot or write down steps how your writing back to .csv.

Sure.

This is what I see in the wizard when I am doing data scraping and when I try to write it to csv, I see an empty file.

@ddpadil : Is there anything that I am missing?

Hi,
Look all good.:thinking:
could you please just add message box after extract structured data activity and pass this
ExtractDataTable.Rows.Count.ToString (just to see whether it hold any data)

@ddpadil: Just tried that. Surprisingly there’s nothing in the message box. It says 0. Not sure what’s wrong

ok which mean problem with data scraping not with csv.
I think your trying to extract from pdf so it’s not focused when it’s executing .(it might be executing fast though i see you given delay before that .)
so could you please do it separately means keeping pdf foreground and do data scraping and see the number of rows.

PS: you could set continue on error to false to see what’s the error pops up.

1 Like

@ddpadil : What do you mean by keeping pdf in foreground? I couldn’t understand that part

means make sure pdf is visible when execute data scraping.

@ddpadil: Thanks dilip, when the PDF was made visible on screen, the data scraping is happening and it’s working fine. But I have a question here. Is there any method in UiPath where the scrolling happens dynamically. I thought of writing a loop to scroll down depending on the value returned from Element exist, but even when the element is not displayed on the screen, it is returning true. So that logic isn’t working. Is there any possibility of scrolling down dynamically in UiPath?

cool.:slightly_smiling_face:
Element exist works on selector hence target application need not necessary to be visible.
Try with Image exist (keep some delay before after) . Hope that will return right Boolean which can be used in the scrolling down logic.

@ddpadil: Thanks a ton for that. My logic works now. Really thanks. :slight_smile:

1 Like

I have the same issue. The window is visible. It is so weird. I try clicking the window just before data extraction step runs to make sure it is active and it still does not work.