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 28
| import xlrd
from xlwt import Workbook
data = "/Users/****/Desktop/issuerbank.xls"
table = xlrd.open_workbook(data)
#Création nouveau ficher excel
path = r"/Users/****/Desktop/fichier.xls"
classeur = Workbook()
feuille = classeur.add_sheet("1")
feuille.write(0,0,'Issuer Bank')
classeur.save(path)
#Lecture dans un fichier
def get_data(col_min, row_min, col_max, row_max):
for curr_col in range(col_min,col_max,1):
for curr_row in range(row_min, row_max, 1):
data = worksheet.cell_value(curr_row,curr_col)
print(data)
print("--------------")
pass
nom_des_feuilles = table.sheet_names()
#Récupération données de la page
worksheet = table.sheet_by_name("1")
#Récupération table
x=get_data(0,0,1,9) #0: colonne la plus à gauche du tableau ; 5: ligne la plus haute ; 3:colonne la plus à droite ; 10: ligne la plus basse |
Partager