0

I want to create a routine in Python that reads an excel file in a given folder, modifies it, and saves it. What I want it to do with the excel file is to modify a column of dates in a mm/yyyy format into two columns with the same dates in a mm yyyy format.

  1. This is what the initial spreadsheet looks like

Picture of initial form

  1. This is what I would like to change it to:

Picture of final form

danronmoon
  • 3,814
  • 5
  • 34
  • 56
  • What have you tried so far? – wogsland Jan 12 '20 at 18:48
  • You can use some library to open the excel: https://stackoverflow.com/questions/3239207/how-can-i-open-an-excel-file-in-python. Check out the openpyxl package documentation about how to modify values. I didn't have a look at the exact formats, but you should be able to figure out an easy way to modify the cell values using a simple python function. Finally, you can save the excel again using the same package. Google the individual steps separately and you'll find answers on stackoverflow! :) – DaveTheAl Jan 12 '20 at 19:18

0 Answers0