2 Questions to ask:
Ques 1:
I just started studying about xlrd for reading excel file in python.
I was wondering if there is a method in xlsrd --> similar to get_active_sheet()
in openpyxl or any other way to get the Active sheet ?
get_active_sheet()
works this in openpyxl
import openpyxl wb = openpyxl.load_workbook('example.xlsx') active_sheet = wb.get_active_sheet()
output : Worksheet "Sheet1"
I had found methods in xlrd
for retrieving the names of sheets, but none of them could tell me the active sheet.
Ques 2:
Is xlrd
the best packaage in python for reading excel files? I also came across this which had info about other python packages(xlsxwriter
xlwt
xlutils
) for reading and writing excel files.
Which of the above all will be best for making an App which reads an Excel File and applies different validations to to different columns
For eg: Column with Header 'ID' should have unique values and A column with Header 'Country' should have valid Countries.