Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sort Column using openpyxl

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
like image 340
user765443 Avatar asked May 04 '26 06:05

user765443


1 Answers

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
like image 121
alecxe Avatar answered May 05 '26 19:05

alecxe