Skip to content

Commit

Permalink
Date processing
Browse files Browse the repository at this point in the history
  • Loading branch information
rakeshlinux committed May 8, 2018
1 parent edb37b7 commit ccffb19
Show file tree
Hide file tree
Showing 6 changed files with 1,837 additions and 6 deletions.
29 changes: 29 additions & 0 deletions ChangeDateCSVFile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import csv
import xlwt
with open("DOB.csv") as csvfile:
csv_reader = csv.reader(csvfile)
wb = xlwt.Workbook()
ws = wb.add_sheet("DOB")
ws.write(0,0,"Admno")
ws.write(0,1,"First")
ws.write(0,2,"Last")
ws.write(0,3,"Class")
ws.write(0,4,"section")
ws.write(0,5,"DOB")
i=1
for line in csv_reader:
# print(line)

line2 = line[5].split(' ')
line3= '-'.join(line2)
#print(line3)
# print(line2)
ws.write(i,0,line[0])
ws.write(i,1,line[1])
ws.write(i,2,line[2])
ws.write(i,3,line[3])
ws.write(i,4,line[4])
ws.write(i,5,line3)
i= i+1
wb.save("dob.xls")
print("New Excel Sheet generated...............")
Loading

0 comments on commit ccffb19

Please sign in to comment.