views:

15

answers:

1

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 affecting the current user's global settings?

+1  A: 

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.

Nick