Python script that iterates through an Excel file and performs a ping command for each host/IP address.
Before running this script, ensure Python version 3.6 or newer is installed on your machine.
To install libraries required to run this script, perform the following instructions:
- Open Command Prompt or other terminal
- Install the openpyxl library by entering-
pip install openpyxl
- Install the pythonping library by entering-
pip install pythonping
ping-from-excel.py requires the user to input the following:
- A valid Excel file path
- The file path for a new or existing .txt file to log ping details
- The column which lists hosts/IPs to ping
- The starting row which lists hosts/IPs (e.g. with a table header in row 2, row 3 is the starting row)
ping-from-excel.py will output:
- A text file with each ping test's details as well as a final summary of how many hosts/IPs are pingable
- Modify the Excel file so that the hosts/IPs that are reachable will be in green text, and those unreachable will be in italicized red text