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
   |  
def main(argv):
	personne=""
	semaine=""
	base_1=[]
	week_col_2=[]
	chemin_rep_breakdown='d:\\xfile'
	personne=input
	fichier_xls='Breakdown_'+str(personne).upper()+'.xls'
	if len(sys.argv)==1:
		if fichier_xls in os.listdir(chemin_rep_breakdown):
			book = xlrd.open_workbook(fichier_xls)
			sh = book.sheet_by_index(2)
			week_col=sh.col(13) #retourne une liste de la colone de la semaine
			for indice_semaine in range(len(week_col)):
				week_col[indice_semaine]=str(week_col[indice_semaine]).replace('number:',"").replace('.0',"").replace('text:u',"").replace('Week',"")
			week_col=list(set(week_col))
			for l in week_col:
				if l !="''":
					week_col_2.append(str(l))
			for el in week_col_2:
				out = el.decode('utf-8')
			base_1=personne_semaine(fichier_xls,personne,out,base_1)
			print base_1
main() | 
Partager