I'm pretty sure there is no such thing in openpyxl or xlwt or even xlsxwriter (but if you're on windows, you can do it via win32com and Excel.Application
).
Usually, you should just read the data from the excel file, sort it in python and write the data back.
See similar questions: