Python - excel : writing to multiple cells takes time

后端 未结 3 1271
没有蜡笔的小新
没有蜡笔的小新 2021-02-10 14:40

I\'m using win32com.client to write data to an excel file. This takes too much time (the code below simulates the amount of data I want to update excel with, and it takes ~2 sec

3条回答
  •  谎友^
    谎友^ (楼主)
    2021-02-10 15:30

    Note that you can set ranges via numeric adresses easily by using the following code:

    cl1 = Sheet1.Cells(X1,Y1)
    cl2 = Sheet1.Cells(X2,Y2)
    Range = Sheet1.Range(cl1,cl2)
    

提交回复
热议问题