Click here to Skip to main content
15,899,475 members
Please Sign up or sign in to vote.
2.67/5 (3 votes)
See more:
Hai Hi,
I am in the need of scrapping data from a screen. I have a windows form. When this form opened the data available on the form as a table should be taken and stored in an Excel file. I can take screen shot of the form. But I don't know how to scrap data from the image. Please help me in this issue. It is urgent. Is it? Thanks in advance.
Posted
Updated 7-Mar-11 9:32am
v2
Comments
Sergey Alexandrovich Kryukov 6-Mar-11 23:22pm    
Do you want to "scrap" graphical image data, text data or some semantic data?
What do you want in Excel data as a result, strings?
--SA

In the old days, you could scrape text off of emulators (like the VT100). They were text based.

You can scrape text off of web browsers because they are text based (HTML).

But a typical windows form is a rendered graphical image. You would have to resort to OCR. That's a pretty big can of worms you don't to open.

You might be able to use the old Windows Get Text message. You would need to get the main window handle and then iterate the child windows.

The windows message is WM_GETTEXT.

http://msdn.microsoft.com/en-us/library/ms632627(v=vs.85).aspx[^]

I would google WM_GETTEXT and whatever language you are using.
 
Share this answer
 
Use Excel (Office) InterOp.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900