The import XLWT, XLRD
The from openpyxl
The import load_workbook
Wb=load_workbook (" E: \ Shared \ backup contract detail query. XLSM ", keep_vba=True)
Wb2=load_workbook (" E: \ backup \ finished product data sharing. XLSX ")
Sheet=wb. Get_sheet_by_name (" product data ")
Sheet2=wb2. Get_sheet_by_name (" contract database ")
D=sheet2. Max_row
P=sheet2. Max_column
For x in range (1 d) :
For y in range (1, p) :
Sheet. Cell (x, y). value=https://bbs.csdn.net/topics/sheet2.cell (x, y). The value
Wb. Save (' E: \ Shared \ backup contract detail query. XLSM ') print (" finished ")
CodePudding user response:
Simulation excel save once again, like open the two modesCodePudding user response:
After running the cell data can be read and write in the past, is to control future type and button disappeared