Excel Calculation Performance 計算效能
如何加快EXCEL的計算效能呢?
首先.建議你閱讀如下文章
Excel 2010 Performance: Improving Calculation Performance
將我覺得較有用的列出如下(個人為解決ole automation時的效率問題)
1.改變為手動計算 Excel.Calculation := xlCalculationManual;
自行呼叫EXCEL.Calculate;
2.改變 Excel.WorkBooks[1].ForceFullCalculation := True
3.關閉"multi-threaded calculation" Excel.MultiThreadedCalculation.Enabled := False;
關於第3點要特別說明,因為發覺EXCEL預設此選項為開啟的,但在實測卻覺得EXCEL的計算並不快速! 查看原文
"You can manually specify the number of threads to run at the same time. This number can be more than the number of processors on the computer. This is useful if, for example, you have XLL user-defined functions dependent on long-running external calls to a database server. If the database server can process multiple requests in parallel, you can effectively use multithreading even on a single-processor system."
可以得知,在特定的情況下開啟才會加快計算效能,而我個人測試.不論是在文章中的"環境"或是最原始的單一EXCEL環境,關閉此選項均比開啟來得快!