|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Excel Idea
I had an idea that I thought would be extremely cool if I could get it to work, but unfortunately I dont have the programming skills to make it happen.
Here is my thinking. So I have a batch file that polls the network for all computer names and sends the output to a text file. After collecting the computer names, and importing them into an excel spreadsheet, how would I go about creating a "self-updating" spreadsheet that passed the computer name to various command line commands (like ping) and returning their value(s) to Excel? Is this possible? I have the batch files that return the values I am looking for: domain, IP, MAC, computer name. Is there a way to go about this so that the process is completely automated? Any ideas? Could someone point me in the right direction as to how I could do this? Any input is greatly appreciated. |
|
#2
|
|||
|
|||
|
You can have some VBA kick off external (bat file) processes from the workbook, and those can then be used to update the content.
Once that is done you can import the data programatically. |
|
#3
|
|||
|
|||
|
But how? I have never really used VBA before. I can look at the code and get a basic idea of whats going on, but as far as me trying to code this, not in a hundred light years... Any relevant topics I should research to help me try to accomplish this?
|
|
#4
|
|||
|
|||
|
ok mate - plan of action...
If you have the bat file which does the work, then have it pipe the data to a text file. On the last line of the bat file put the path and name of the Excel spreadsheet file (not the *.exe) which you want to import the data - this will launch it. In the workbook open event put the code which you run to import the data from the text file and process it. Private Sub Workbook_Open() ' Place code here End Sub What should happen is you provide a shortcut to your *.bat file. The user runs it, and it runs the batch file - and when the batch file is complete it starts up your Excel spreadsheet. Your spreadsheet then starts running your import code, and lays it out etc however you like. Not quite what I had originally thought of, but you might find it this method easier to implement. Hope this helps. |
|
#5
|
|||
|
|||
|
Hey,
I am not sure I understand. I have a program in VBA that querys the web and other programs on my local HD to get the data that it needs to work. All I did was use querying. Can't you do that? If you need more help I got a lot of my excel help from a web site called Mr excel they are really good. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > Excel Idea |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|