Reading data from an Excel sheet

Network and IT engineers always use the excel sheet to store information about the infrastructure such as IP addresses, the device vendor, and credentials. Python support reading the information from an excel sheet and processes it so you can use it later during the script.

In this use case, we will use the Excel Read (xlrd) module to read the UC3_devices.xlsx file which contains the hostname, IP, username, password, enable password and vendor for our infrastructure and use this information to feed the netmiko module.

The Excel sheet will be as shown in the following screenshot:

First we will need to install ...

Get Hands-On Enterprise Automation with Python. now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.