|
Home > Archive > Unix Programming > August 2006 > Unix and Windows
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| c language 2006-08-21, 1:23 am |
| Hello everybody,
I am running my C++ program in Unix and after every run, I have to
transfer
my results to Windows to design a graph of my results in Excel.
I would like to know if there is any possibility to make a link between
Unix and Windows to be able to run Excel every time that Unix finishes
its job.
Thanks,
Mohsem
| |
| Pascal Bourguignon 2006-08-21, 1:23 am |
| "c language" <jafarikia@gmail.com> writes:
> I am running my C++ program in Unix and after every run, I have to
> transfer
> my results to Windows to design a graph of my results in Excel.
> I would like to know if there is any possibility to make a link between
> Unix and Windows to be able to run Excel every time that Unix finishes
> its job.
It's probably possible. I don't know the MS-Windows side.
The most I could do, is to install cygwin on MS-Windows, and configure
it to launch sshd at boot time.
Then in the unix program, I would run something like:
system("scp my-output-files microsoft-windows-computer:/some/spool/dir/");
system("ssh microsoft-windows-computer \
/some/command /some/spool/dir/my-output-files");
/some/command on the Microsoft Windows computer could then do whatever
it has to do to launch Excel and make it do whatever you need it to
do.
--
__Pascal Bourguignon__ http://www.informatimago.com/
CAUTION: The mass of this product contains the energy equivalent of
85 million tons of TNT per net ounce of weight.
| |
| bugnthecode 2006-08-21, 1:23 am |
| Sure there is a way, but how much effort do you want to put into it? My
first thought was to make your c++ program email it, then write a
program on your windows machine to check that email account, grab the
attachment, and get to processing.
You could also write a basic server on the unix machine, and have a
service on the windows machine check for updates. Or even run a
webserver, and store new results on the web server and have the program
on windows check for new data. Xml?
Your biggest obstacle is going to be researching the needed apis and
libraries to create graphs through excel, or that excel will
understand. This also leads to another possibility; you could actually
have your program create the graph in unix. Openoffice often works with
excel files interchangeably.
So you have 2 problems to solve. 1 how are you going to transfer the
data, and 2 which machine will do the processing.
Probably not the answer you were looking for, but hopefully it'll give
you a start.
Will
| |
| ffairy2323@yahoo.com 2006-08-21, 7:30 am |
| oh ok so how do u connect from windows to unix....could u expain
briefly
regards
<a href=www.gamestotal.com>free</a>
<a href=http://unificationgame.bravehost.com/>online</a>
<a href=http://unificationwarszone.worldbreak.com/>MMOG</a>
| |
| ffairy2323@yahoo.com 2006-08-21, 7:30 am |
| oh ok so how do u connect from windows to unix....could u expain
briefly
regards
<a href=www.gamestotal.com>free</a>
<a href=http://unificationgame.bravehost.com/>online</a>
<a href=http://unificationwarszone.worldbreak.com/>MMOG</a>
| |
| c language 2006-08-21, 7:30 am |
| Hello,
I am using my own PC to work in the Windows environment and for using
UNIX; I am using 'Teraterm' or 'Putty' to be able to connect to
the university network. The university that I am working in has
powerful UNIX machines which are very good for handling big programs.
Thanks,
Mohsen
ffairy2323@yahoo.com wrote:
> oh ok so how do u connect from windows to unix....could u expain
> briefly
>
>
>
> regards
> <a href=www.gamestotal.com>free</a>
> <a href=http://unificationgame.bravehost.com/>online</a>
> <a href=http://unificationwarszone.worldbreak.com/>MMOG</a>
| |
| Daniel Franke 2006-08-21, 1:34 pm |
|
> I am running my C++ program in Unix and after every run, I have to
> transfer my results to Windows to design a graph of my results in Excel.
Assuming that you are not creating that graph manually every time, you may
try to employ R (www.r-project.org). One has to get used to it, but its a
powerful tool.
Suggestion: prepare a shell script that
a) calls your program
b) calls R for the processing (`R CMD BATCH <scriptfile>`)
c) emails the results to you
If appropriate, use cron to call this script regularly.
Daniel
| |
|
|
Firstly, make or install a server that allows you to transfer the raw
data. This could even be a php script (on windows) / HTTP client lib
(UNIX). The php script could run a small app linked against the COM type
libraries that ship with office. You could then use COM/OLE to create an
instance of Excel, and edit the worksheet automatically based on data
POSTed from your UNIX app via the php (or some other similar solution).
Controlling Excel from the C++ COM interface is not brilliantly
documented, but I've done basically what you suggest before for an
engineering application, where a big analysis job runs multiple iterations
on Linux with excel doing some calculations between iterations, and
feeding the data back into the analysis in realtime.
Why not use GNUPlot for graphing on UNIX instead? or even write data that
you can graph with PHP/JPGraph/Apache instead?
See here for a simple example of Excel
automation (scroll past all the junk at the top of the page)
http://www.experts-exchange.com/Pro...Q_20642013.html
On Sun, 20 Aug 2006 19:39:31 -0700, c language wrote:
> Hello everybody,
>
> I am running my C++ program in Unix and after every run, I have to
> transfer
> my results to Windows to design a graph of my results in Excel. I would
> like to know if there is any possibility to make a link between Unix and
> Windows to be able to run Excel every time that Unix finishes its job.
>
> Thanks,
> Mohsem
|
|
|
|
|