C#-强制Excel在保存之前重新计算 [英] C# - Force Excel to ReCalc before Save

查看:68
本文介绍了C#-强制Excel在保存之前重新计算的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

早上好溢出者!

我一直在写一个代理,它将打开一个Excel文件,修改两个单元格,然后保存工作簿以及该工作簿的副本.

I have been writing an agent which will open an Excel file, modify two cells and then save the workbook as well as a copy of this workbook.

我真正需要的是在保存之前,我的代理强制对整个工作簿进行重新计算,以便我的所有查询(由于内部加载项而在公式栏中)重新运行并获取SQL数据库中的最新值.

What I really need is for just before the save, my agent to force a recalc on the whole workbook, so that all of my queries (which are in formula bars due to an inhouse add-in) re-run and get the latest values from an SQL Database.

如果有人可以对此提出任何建议,将不胜感激.

If anyone could make any suggestions on this, that would be much appreciated.

非常感谢

推荐答案

理论上,基于 查看全文

登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆