Python Forum
Combining information from excel
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Combining information from excel
#1
I have a file of excel data I'm reading into python. The excel file contains the information of people who have signed up for an interview.

An example of the excel file w/ dummy data is attached below.

Rather than including the date/time in the sessions registered file, the data was provided in separate columns for the dates, with the times listed below.

I need to write code that will combine the date/time into "2017-11-22 17:00" format. Being new to python, I don't know the best way to do this given the format in which the excel file was exported. I can easily fix this manually in excel, but since this will be ongoing, I'd like to learn how to do it in python. I would like to create a loop that will feed each row into something similar to the win32.com code below so that I can send out the confirmation outlook confirmation emails/reminders.

oOutlook = win32com.client.Dispatch("Outlook.Application")
appt = oOutlook.CreateItem(1) # 1 - AppointmentItem
appt.Start = ''
appt.Subject = str(input('Enter subject:'))
appt.Duration = str(input('Enter duration in increments of 15 minutes:'))
appt.Location = ''
appt.MeetingStatus = 1 # 1 - Meeting; Changing the appointment to meeting
appt.Recipients.Add("")
appt.Save()
appt.Send()
print ("Done")
[quote]



   
Reply
#2
There are lots of packages available to read both excel and outlook,
for outlook, see: https://pypi.python.org/pypi?%3Aaction=s...mit=search
for excel see: https://pypi.python.org/pypi?%3Aaction=s...mit=search
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020