开发者

Can I set the ErrorCheckingObjects in Excel per worksheet?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜