import re
import lxml
import xlrd
import xlrd
import xlwt
path=r'路径'
wb=xlrd.open_workbook(path)
writrfile=xlwt.Workbook(encoding='utf-8',)
sheet_num=wb.nsheets
table = wb.sheets()[0]
sheet_names=wb.sheet_names()
sheet=wb.sheet_by_index(0)
rows=sheet.nrows
columns=sheet.ncols
row_data=sheet.row_values(0)
col_data=sheet.col_values(1)
print(sheet_num)
print(table)
print(sheet_names)
print(sheet)
print(rows)
print(columns)
print(row_data)
print(col_data)
print(sheet.cell(1,0))
tool=sheet.cell(1,0).value
tool="支付宝"
sheet.cell(1,0).value=tool
print(tool)
sheet1=writrfile.add_sheet('sheet1',cell_overwrite_ok=True)
- 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
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54