2013-02-08 41 views
0

我試圖從How do you get Excel to refresh data on sheet from within VBA?適應VBA的例子,他們不工作:sheet.Calculate什麼都不做,計算其他版本無法找到...如何使用Python F9 Excel書?

+0

你是什麼意思計算?重新計算公式? – 2013-02-08 16:16:01

+0

是的,計算公式的結果(相當於F9) – 2013-02-08 16:18:32

+0

http://stackoverflow.com/questions/4198365/facing-problem-with-xlwt-and-xlrd-reading-and-writing-simultaneously – 2013-02-08 16:20:51

回答

0

添加CalculateFull宏觀progrmmatically,把它解決了這個問題,但長相卷積...

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')