generate functionThu, 03 Aug 2023

Ejercicio de manejo de Excel en base al fichero 02_Excel_data.xlsx: Abre el fichero Excel Lista las hojas que hay Crea una nueva hoja que se llame olimpiadas entre ventas y otros Vuelve a listar las hojas que hay Guarda los cambios y comprueba en el excel si se han efectuado

import xlrd book = xlrd.open_workbook("02_Excel_data.xlsx") print("The number of worksheets is {0}".format(book.nsheets)) print("Worksheet name(s): {0}".format(book.sheet_names())) sh = book.sheet_by_index(0) print("{0} {1} {2}".format(sh.name, sh.nrows, sh.ncols)) print("Cell D30 is {0}".format(sh.cell_value(rowx=29, colx=3))) for rx in range(sh.nrows): print(sh.row(rx))

Questions about programming?Chat with your personal AI assistant