我尝试从How do you get Excel to refresh data on sheet from within VBA?调整VBA示例,它们不起作用:sheet.Calculate什么都不做,找不到其他版本的计算...
答案 0 :(得分:0)
以编程方式添加CalculateFull宏并调用它可以解决问题,但看起来很复杂......
xlmodule = book.VBProject.VBComponents.Add(1) # http://support.microsoft.com/kb/282830 if this line throws an error
xlmodule.CodeModule.AddFromString('Public Sub AnotherCalculateFull() \n\
Application.CalculateFull \n\
End Sub')