I am using Pandas built in to_excel function to create an excel sheet using a data frame I created.
DataSet.to_excel("July24th.xlsx", sheet_name='sheet1', index=False)
I am wondering if I can name my excel sheet using the current date. I want this code to automatically take on the date. I am trying to run my python code on a scheduled basis. so every day I run my code, it will create an excel sheet for that day. I want to keep all the excel sheets generated.
I tried using something like this:
import time
TodaysDate = time.strftime("%d/%m/%Y")
excelfilename = TodaysDate +".xlsx"
DataSet.to_excel(excelfilename, sheet_name='sheet1', index=False).
But the above gives an error. In what other ways can I get such an output.