-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExcelBased.py
More file actions
27 lines (24 loc) · 799 Bytes
/
Copy pathExcelBased.py
File metadata and controls
27 lines (24 loc) · 799 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
'''
Created on Jun 20, 2017
@author: Coalesce
'''
from openpyxl import Workbook
from pip._vendor.distlib.compat import raw_input
import os, calendar
workBookFile = raw_input("Enter workbook (excel) name: ")
directName = 'C:/Users/Coalesce.Coalesce-PC/Documents/Temp'
finalFile = directName+"/"+workBookFile+".xlsx"
if(os.path.exists(directName)):
print('Navigating to dir...')
workBk = Workbook()
monthList = calendar.month_name
#['January','February','March','April','May','June',
# 'July','August','September','October']
j = 0
for i in monthList:
if not(len(i)) == 0:
#print(i)
tempSheet = workBk.create_sheet(i, j)
j+=1
workBk.save(finalFile)
print('File created!')