Networking
cancel
Showing results for 
Search instead for 
Did you mean: 

Excel macro to display remote file.

SOLVED
Go to solution
Henry Chua
Super Advisor

Excel macro to display remote file.

Hi Guys,

How can I write a excel's macro script on my pc to copy a file from a Unix system and display the result every 5 minutes interval?

Thank u.

Best regards
Henry

 

 

P.S. This thread has been moevd from Archived Desktops and Workstations Boards > Windows based to Microsoft > networking. - Hp forum moderator

3 REPLIES
Ron Kinner
Honored Contributor

Re: Excel macro to display remote file.

Need a little more info. When you say "copy a file" is the Unix system acting as a mapped network drive (already mapped or do we need to map it?) or do you want to ftp the file or rcp or telnet/cat or what? What type of file is it? Where do you want the file copied to and what result do you want Excel to show? "The copy was succesful/unsuccessful" or the text of the file or? What happens to the result from five minutes ago? Do we write over it or move down a row or over a column or what?

Ron
Henry Chua
Super Advisor

Re: Excel macro to display remote file.

Hi Ron,

What I would like to do is the transfer the file over to the window system either thru ftp or any other means; is it possible to map a unix folder? then the program will used macro to generate a graph chart and refreshes every 5 mins or so. My main hurdle is to know how to transfer the file over from unix to window..

The information coming in should append the existing data - row by row

Thank u
Henry
Ron Kinner
Honored Contributor
Solution

Re: Excel macro to display remote file.

Mapping a Unix drive: I think the UNIX box has to run something like Samba but it does happen.

http://www.cae.wisc.edu/site/public/?title=2ksamba

http://www.amherst.edu/it/web/unix/mapwin.html

This is how you write an ftp script in windows:

http://support.microsoft.com/?kbid=96269

I'm thinking it would be easier to have the UNIX system ftp the file to your box every five minutes. You could run War Ftp as an ftp server or use the sorry one that comes with Windows. Then your Excel program would only need to look in the receiving folder periodically and if it saw something grab the file and move it. You have to be careful with this since the possibility of a race condition exists. (Excel might try to get the file before FTP is completed and thus only get part of a file)

What I still don't understand is what the file looks like or represents. Is it just a single number, a string of numbers or something else. Does the file have the same name everytime or does it change. If it has the same name do we need to filter out the additions or process the info somehow?

So far it is starting to sound like MRTG would solve your problem better than Excel. It runs every 5 minutes and gets data from other systems by default with snmp but can also run a script instead then processes the data and draws a constantly updating graph which can be displayed by a web browser if desired. It's a free program. Runs on Perl which is also free. Originally designed to just monitor network traffic it has been expanded over the years to be very flexible.

http://mrtg.hdl.com/mrtg.html

Ron