Paul,
How are you getting it into the workbook? If you are opening an Excel
Application istance in C#, you can just set the Calculation property on the
excel instance to xlManual (the value should be included in the interop
assembly library as a constant or a value in an enumeration). This will
have the same effect as setting the property in VBA.
If you are using OLEDB (through the classes in the System.Data.OleDb
namespace) to populate the sheet, then when you are done, you will have to
open the sheet through automation, set the property, do whatever other work
you have to do, and then set it back.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
<pa************@hotmail.comwrote in message
news:11*********************@r34g2000hsd.googlegro ups.com...
Hi
Im using c# to extract some data from Access and then insert it into
an excel workbook. I want to set calculations in excel to manual on
opening the book and then set it to revert to automatic once the data
has been inserted into the sheet.
Using vba i would use the following:
with Application
.calculation = xlManual
end with
Any ideas how i can do this is c#?
Thanks for any suggestions.
Paul