View Single Post
  #14  
Old 01-11-2011, 11:23 AM
olivebranch2006 olivebranch2006 is offline
Registered User
 
Join Date: Apr 2010
Posts: 35
Working Code

I know we had some emails off-forum so here is the semi-working script... It works by grabbing the first ip address from Excel's 6th column, row 4. My ip addresses are listed in that column and the script will ssh to the ip, perform commands and extract data to strings, write the data to the hostname and S/N columns, exit the device, ssh to the next ip and loop this until it has a row with no ip address(essentially the end of the list).

But there is some strange behavior...

It has no trouble reading the ip addresses, ssh into them, find hostname and serial, I know this because of watching the securecrt terminal and then seeing the msgbox tell me the serial number every time. It also places the hostname correctly in every hostname column cell sequentially. It only writes two serial number strings in, (one in row 4, one in row 5) and then never writes a serial number again. Is this a vbscript limitation? bad code? Every excel vbscript code example I've seen on the net shows writing to cells this same way and you should have access to any cell number in the sheet.

Any ideas?

Thanks

olivebranch2006
Christo
Attached Files
File Type: zip Capture-Serial-Numbers-to-Excel-v16.zip (1.6 KB, 446 views)
Reply With Quote