Oct-02-2018, 02:29 PM
Hi,
I am completely new to python and I want to replicate something that I am using in Excel. I want to create a .xlsx file call it test1 and do some work within the spreadsheet. Once this is done I would then like to save it in a temp folder (there may be two users using the file in the future) and save it using two variables - JobId and the other is environment. Once saved I will then push this to another destination.
How best to proceed with this?
I have seen this code and it creates a folder in the same place that my script is saved but I would prefer it to be a temp folder which would be deleted when I am finished.
I am completely new to python and I want to replicate something that I am using in Excel. I want to create a .xlsx file call it test1 and do some work within the spreadsheet. Once this is done I would then like to save it in a temp folder (there may be two users using the file in the future) and save it using two variables - JobId and the other is environment. Once saved I will then push this to another destination.
How best to proceed with this?
I have seen this code and it creates a folder in the same place that my script is saved but I would prefer it to be a temp folder which would be deleted when I am finished.
mport os def createFolder(directory): try: if not os.path.exists(directory): os.makedirs(directory) except OSError: print ('Error: Creating directory. ' + directory) # Example createFolder('./test/') # Creates a folder in the current directory called data