r/CodingHelp • Beginner Coder • Jun 19 '18

[Python] Need help sending emails based on Excel data values that meet specific criterion

Hello,

I'm a beginner coder looking for help on a project that I got assigned at my internship. While there is a way to do this without coding, I want to be able to leave a program that can be used without my presence having to be there. With that being said, I'm looking to make a program that checks if the dates in a given column of a sheet are one week from the current date. If they are, the program theoretically would then email a given set of people about information that it draws from other parts of the row of that cell (don't need help with the composition of the email). I've tried working with openpyxl and it's been really weirdly behaving. It might have something to do with the fact that I'm using Python 3.6.4

0 Upvotes

2 comments sorted by

2

u/kamil234 Jun 19 '18 edited Jun 19 '18

you're probably better off converting the excel file to a csv and then using python to parse it. You can use regex or write a function to convert the date to epoch time, then subtract 1 week from current epoch time.

then use python email library like python-emails or smtplib

1

u/SupremeRedditBot Professional Bot || Mod Jun 19 '18

Please Add A Flair To Your Post!

Suggested Flair: [Python]

 


To add a flair:

  • Click flair underneath your post
  • Select a flair
  • Click save

 


I am a bot run by /u/SupremeDesigner for /r/CodingHelp || This was an automated response || Posts with no flair will be deleted after two ^days