I've been building out an Excel workbook that is offered by Interactive Brokers for API trade Execution. Over the last few years I've been adding sheets that include new automated trade strategies.
Now the workbook is at a point where Macros that take less than a second to run on previous versions of the modified workbook that I have been building out take 15 seconds or even longer. I've spent a lot of time trying to find the source of the problem.
I can not find the source of the problem.
If anyone has any suggestions on what else to try it would be greatly appreciated.
If it's relevant the API sample excel file (which I've built out) van be found here
答案 0 :(得分:1)
I have encountered similar situations in the past. Here is something you can try:
Open
buttonOpen and Repair
Keep in mind that repairing your workbook may result in losing some formatting. It's advised that you create a backup before proceeding.
答案 1 :(得分:1)
你可以尝试一些事情。
尝试关闭自动计算(即使宏要求它打开),只是为了测试它现在是否更快。如果这样可以解决问题,那么某个公式就会出现问题。
如果这不起作用,请尝试删除一些
原始文件和修改后的文件中的代码定期Debug.print now ()
,然后比较即时窗口中的时间,以识别减慢它的代码段。
如果文件的大小增加超过预期,您可以尝试清除多余的格式。它内置于excel中的一个名为inquire的免费加载项中。只需管理附加组件选项并将其打开即可。
答案 2 :(得分:1)
请查看此文章 Region Settings: Big Impact on Excel’s Calculation Speed
您没有提及工作簿 size ,RAM数量等。 尝试通过将文件保存为" .xlxb"来减小大小。 (二进制Excel文件)。它不会影响宏功能,文件大小也会大大减少。
此外,请检查外部链接(如果有)(数据菜单 - >编辑链接)并进行调查。