excel Of index It's from 0 At the beginning
Mainly used
xls = xlwt.Workbook() # Create a excle
sheet = xls.add_sheet(“sheet1”) # Create a sheet
Now you can operate ,sheet It's already created
sheet.write(row,col,“data”) # In the row That's ok col Column write data
xls.save(" Storage address ")
It mainly includes
xls = xlrd.open_wordbook(“ File path ”) # Read excle
xls.sheet_names()[index] # Return all sheet , You can add [ index] Return the specified sheet
#sheet = sheet.
xls.sheet_by_name(“name”) # The return name is name Of sheet
xls.sheet_by_index(data) # Return ..
#sheet1 = sheet_by_index(0)
shee1.row_values(n) # For the first n All the data of the row
sheet1.col_values(n) # For the first n All data of the column
shee1.cell(1,1).value() # return sheet1 Two rows and two columns of data
sheet1.cell_value(1,1) # ditto
sheet1.cell(1,1),ctype() # Get the properties of the cell
2020/10/7