How to sort Excel sheet using Python
问题 I am using Python 3.4 and xlrd. I want to sort the Excel sheet based on the primary column before processing it. Is there any library to perform this ? 回答1: There are a couple ways to do this. The first option is to utilize xlrd, as you have this tagged. The biggest downside to this is that it doesn't natively write to XLSX format. These examples use an excel document with this format: Utilizing xlrd and a few modifications from this answer: import xlwt from xlrd import open_workbook target