473,396 Members | 1,990 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Set Manual Calculation in Excel

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

Jul 30 '07 #1
1 4901
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
Jul 30 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Aravind | last post by:
Hi folks. I have a form, frmHistory, that has the following code for its On Open event. =-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-= Private Sub Form_Open(Cancel As Integer) ...
2
by: Del | last post by:
Thanks in advance for any help. I have a database that was created in Access 2000. Several users have been upgraded to Access 2003. Since upgrading to 2003 we have noticed that some of the...
3
by: Nigel C | last post by:
My problem is best explained by way of tables and examples... I am using Access 2000 (in case this is relevant) and I have a table with the following fields... Field names ------------ Code ...
1
by: kids_pro | last post by:
Hi there, Is there any name space that contain function to evaluate and expression like this =12 +100/23* 120 ... and return the calculated value back? Cheers,
2
by: Paul Remblance | last post by:
Is there a 'simple' way to perform a calculation on a textbox entry similar to Excel. For example: if the user enters =2*3 the validated event changes it to 6.
15
by: New2Access | last post by:
I'm sure this is simple... I can get this to work in Excel, but I need help getting it to work in Access: I am using a form to populate a table. I have fields for first name and last name. I...
4
by: wrldruler | last post by:
Hello, First, I know it's against "Access Law" to save calculations in a table, but....I want/need to. I currently have sub-totals being calculated inside a form, using DMax, DCount, and...
19
by: LucasLondon | last post by:
Hi there, First of all apologies for the long post. Hope someone can offer some advice. I have about 200 columns of time series data that I need to perform a correlation analysis on in terms...
5
by: =?Utf-8?B?amVsbGU3OQ==?= | last post by:
Hi, I want to use a difficult Excelsheet as source for my calculation in a ASP.NET (C#) page. I have 5 input fields on my ASP.NET page and when I press the submit button I want to put these...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.