Sort Column using openpyxl
11,715
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:
- how to sort xls file column wise and write it to another file with entire row using python?
- xlrd / xlutils reordering spreadsheet rows
Related videos on Youtube
Author by
user765443
Updated on September 14, 2022Comments
-
user765443 over 1 year
I have created Excel sheet and written data into Excel file.
Do we have any functionality for sort column using
openpyxl
? I could not attach Excel sheet and droping one row of excel sheet:0 -269.9 99.97 0 -25.58 0 0.0006901 -269.9 127 0 26.23 0 810 -269.9
-
jmcnamara almost 11 yearsThis is correct. I can confirm that sorting isn't part of the file format and thus can't be done with the Python Excel file creation modules.