[xlwings在api上使用api.autofill()不起作用

问题描述 投票:0回答:1

我知道下面的代码适用于Windows,但是有人可以告诉我它如何在Mac OS上工作吗?

import xlwings as xw
from xlwings.constants import AutoFillType

wb = xw.Book('Book1')
sheet = wb.sheets(1)
sheet.range('A2').api.AutoFill(sheet.range("A2:A10").api,
                               AutoFillType.xlFillDefault)

thx

python autofill xlwings appscript
1个回答
0
投票

问题已解决!

import xlwings as xw
from xlwings.constants import AutoFillType

wb = xw.Book('euromillions.csv')
ws = wb.sheets('euromillions')

ws.range("A2").api.autofill(destination = ws.range("A2:A5").api, type = AutoFillType.xlFillDefault)
© www.soinside.com 2019 - 2024. All rights reserved.