Originally posted by jim swarthout:
Hi. I'm trying to get a java program to read from and write to a live excel spreadsheet (i.e. if the user changes a cell in excel, the java program is informed immediately of the new value and if the java program wants to poke a new value into a particular cell, it can do so immediately as well). My programmers tell me that this cannot be done easily. Is this the case? Any guidance would be most appreciated. Thanks.
Which are you unsure of: your programmer's honesty, competence or enthusiasm?
Having a Java program interact with a running instance of Excel would be quite tricky indeed. I'd think they would have to write a VBA program to run in Excel that...
Establishes some kind of inter-process communication (a TCP/IP connection?) with the Java program.Watches for cell value changes and sends them out to the Java programListens for modification requests from the Java program and makes those changes. And of course, the Java program at the other end of this comm channel would also have to be made.
I'm no VBA expert, so I'm not positive that this solution is even possible. What the heck, let one of your programmers take a couple days to find out. (The deliverable is not a working program but rather the INVESTIGATION of whether it's actually possible to make the tricky parts work.)
Are Excel and Java really part of the requirements? Could you get away with using a Java-based gui and saving files in a format other than Excel? In that case, an all Java solution is a little easier.