我正在尝试仅将筛选的Excel表中的可见数据复制到另一个区域。到目前为止我的代码如下所示:
import xlwings as xw
wb = xw.Book('Test Report.xlsx')
sht=wb.sheets('Sheet1')
sht.range('Table1').api.SpecialCells(12).copy这是复制,我可以看到表格周围的虚线,但是我不知道如何将它粘贴到其他地方。
发布于 2019-10-09 15:47:23
好的,我想这样做:
import xlwings as xw
wb = xw.Book('Test Report.xlsx')
sht=wb.sheets('Sheet1')
sht.range('Table1').api.SpecialCells(12).copy
sht.range('P2').select()
sht.api.paste
sht.api.Application.CutCopyMode=0https://stackoverflow.com/questions/58298866
复制相似问题