How to write Excel goal seek function using C#.net
Hi,
i am using technologies Visual Studio 2010, C#.net, ASP.net and Microsoft office 2003.
I have a requirement to use Excel's Goal seek feature in C#.net. Right now i am using the following code but i am getting the some compilation errors:
Default.aspx.cs code:
using Microsoft.Office.Tools.Excel;
using Microsoft.Office.Interop.Excel;
The following are the errors i am getting right now:
Error 1 'Default2.Object' does not contain a definition for 'Controls' and no extension method 'Controls' accepting a first argument of type 'Default2.Object' could be found (are you missing a using directive or an assembly reference?)
Error 2 'Default2.Object' does not contain a definition for 'Range' and no extension method 'Range' accepting a first argument of type 'Default2.Object' could be found (are you missing a using directive or an assembly reference?)
Error 3 The name 'missing' does not exist in the current context
The above code i am getting from the following link please see it for reference: http://msdn.microsoft.com/en-us/libr...(v=vs.80).aspx
Please can anyone tell me how to fix these errors.
Thanks in advance.
Regards,
Viswanath.
Bookmarks