application watching, data retrieval
Hi,
Here is a question. Lets say I have excel open and I am interested in the value displayed in one cell (which changes over time). I know the position of the cell on my desktop and it doesn't move. Is there a way, a tutorial, an example or how would you even go about reading that one cell into a java application, I am simply curious.
I know you can capture the entire desktop using the robot class, but what if you only wanted that one cell, surely capturing the whole screen is an unneccessary overhead!
Any ideas of how I would even go about doing this?
I am wondering if it can even be done in java...
Thanks, Ron
[659 byte] By [
cakea] at [2007-11-27 1:37:25]

> Hi,
>
> Here is a question. Lets say I have excel open and I
> am interested in the value displayed in one cell
> (which changes over time). I know the position of
> the cell on my desktop and it doesn't move. Is there
> a way, a tutorial, an example or how would you even
> go about reading that one cell into a java
> application, I am simply curious.
>
> I know you can capture the entire desktop using the
> robot class, but what if you only wanted that one
> cell, surely capturing the whole screen is an
> unneccessary overhead!
>
> Any ideas of how I would even go about doing this?
>
> I am wondering if it can even be done in java...
>
> Thanks, Ron
Definitely NOT with the Robot class. What if you change the dimensions of your screen? Then the cell would be on an entire different location on your screen. I'm not even talking about extracting data from the image captured by the Robot class.
Reading data from an Excel sheet can be done by using POI:
http://jakarta.apache.org/poi/
http://www.javaworld.com/javaworld/jw-03-2004/jw-0322-poi.html
You have misunderstood my intent! This is simple an experiment. I am not worried about resizing the screen, i do not want to use POI, I am simply trying to read that cell in my java app, or at least work out a way of doing it using a graphical method! If the robot class cannot facilitate this then can something else?
> Lets say I have excel open and I
> am interested in the value displayed in one cell
> (which changes over time). I know the position of
> the cell on my desktop and it doesn't move.
Thanks, Ron
cakea at 2007-7-12 0:47:57 >

Yeah, actually it was much easier than I thought with the robot class, it really is class!Many thanks, Ron
cakea at 2007-7-12 0:47:57 >
