1

Firstly I do apologies if my question might sound silly or irrelevant. I do not have a high level in any kind of coding language.

I am currently using( playing around with python) and I was wondering if I can automate a process that I deal with every day and I currently do manually. I have an excel spreadsheet that I sort everyday based on the same criteria and I sent it afterwards via email .

Any help.idea.tips.tricks more then welcome

Andrei Cozma
  • 950
  • 3
  • 9
  • 14
  • Please read through some [references](http://www.python-excel.org/), give it a shot yourself, then come back if you get stuck. Folks on this website will help you solve specific problems, most will not write code for you. – wnnmaw Mar 18 '16 at 15:47
  • The work you put in now will pay off in the long run. I believe you can do it! – ml-moron Mar 18 '16 at 15:53
  • Thank you all, extremely helpfull insights :) – Andrei Cozma Mar 21 '16 at 15:58

2 Answers2

1

Check out Openpyxl for the excel and SMTP for the emails, can use schedule to schedule it everyday, shouldn't be hard.

Fuledbyramen
  • 185
  • 1
  • 3
  • 16
0

Here is an answer for sort Excel sheet using Python. You can use either xlrd or pandas to read, sort and write excel files. For pandas, use sort_values() instead of sort() to sort data. For example, you can replace df.sort line by:

df = df.sort_values(by=["col_0", "col_1", "col_2"], ascending=[False, True, False])

After saving the sorted data to excel file, refer this answer to send emails with Python.

Community
  • 1
  • 1
Reese
  • 88
  • 6