开发者

Can I set the ErrorCheckingObjects in Excel per worksheet?

开发者 https://www.devze.com 2023-01-21 07:33 出处:网络
I am generating a CSV file which I then open in Excel via OLE Automation. Because of the format of the data, Excel shows many \"Inconsistent Formula\" warnings (a green icon in corner of each cell).I

I am generating a CSV file which I then open in Excel via OLE Automation. Because of the format of the data, Excel shows many "Inconsistent Formula" warnings (a green icon in corner of each cell). I can turn this off application-wide via automation, using:

objExcel.ErrorCheckingOptions.InconsistentFormula = false

But doing so updates the user preferences permanently and the user needs to know to re-enable that option, if needed.

Is there any way to turn off error checking for an entire Worksheet or Workbook, without aff开发者_开发技巧ecting the current user's global settings?


I don't believe that's possible, no. The only thing I can suggest is keeping the Excel application object alive until the user is done with it and then switching the InconsistentFormula property back to true before exiting the application.

0

精彩评论

暂无评论...
验证码 换一张
取 消