|
You're going to have to explain what you mean and which "event" and how this code is setup. Are you using the Excel Object Model in your C# code?? Or did you write an application in C$ that Excel is running through a Shell statement, or something similar??
|
|
|
|
|
I am not sure about the Excel Object Model.
I want to have a C# library I can call a C# function, which i have done with help of below article.
http://blogs.msdn.com/eric_carter/archive/2004/12/01/273127.aspx
I also want to have setup callback, event in the C# space and i can get the callback/event inside Excel.
eg. i have an event like below, i can get the event with AlarmEventHandler. I just want to have such event happening in Excel.
(below code copied from msdn)
public class AlarmClock
{
public event AlarmEventHandler Alarm;
protected virtual void OnAlarm(AlarmEventArgs e)
{
if (Alarm != null)
{
Alarm(this, e);
}
}
}
public static void Main (string[] args)
{
WakeMeUp w= new WakeMeUp();
AlarmClock clock = new AlarmClock();
<big> clock.Alarm += new AlarmEventHandler(w.AlarmRang);</big>
clock.Start();
}
|
|
|
|
|
Yes, you can do this. Go read MSDN articles about Office Interop and you'll soon be able to do this and much more - as long as your code only needs to work with the later incarnations of Office.
|
|
|
|
|
Hi all,
can any one please tell me how can i read from a file which resides in net work drive?
Regards
Lijo
|
|
|
|
|
As a usual file (e.g. System.IO.File.ReadAllText(...) ) Doesn't it work?
|
|
|
|
|
my file resides in remote system. from that system only i want to read a file. can you please tell me how can i do that?
Regards
Lijo
|
|
|
|
|
This can be done in 3 ways:
1. Map the remote drive (this means, assing e.g. Z: letter to the drive)
2. Read from this location: \\remote-computer\Share\path\file.txt . In this case, the file must be shared in Share folder on the remote computer.
3. If you are running under the credentials of the administrator on the remote computer (this means that two computers are in the same domain), you can read directly from this path: \\remote-computer\C$\path\file.txt .
|
|
|
|
|
Please see also my answer in this thread on CodeProject: [^]
|
|
|
|
|
It's the same as when you read a file from your local drive.
Why would you think it would be any different?
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
Hi,
I have a C# application that generates an organization chart using the Microsoft Visio Org Chart Wizard. It works just fine but i was wondering if it were possible to place the items on the chart at a custom position. Right now, the items are placed starting at the top of the page and i'd like them to start a bit lower.
Thanks
|
|
|
|
|
hi, it is posible that you share your code????
=)
|
|
|
|
|
how i can remove this full tag
<item><br />
<tag1>OK</tag1><br />
<tag2>button OK</tag2><br />
<!-- button2 --><br />
</item>
in this resource file
<resources>
<item>
<tag1>OK</tag1>
<tag2>button OK</tag2>
<!-- button2 -->
</item>
<item>
<tag1>0,0</tag1>
<tag2>button OK</tag2>
</item>
<item>
<tag1>75,23</tag1>
<tag2>button OK</tag2>
</item>
</resources>
|
|
|
|
|
|
|
hi,
i have created a report using report viewer nw i want to make border of some cells double on the basis of a criteria.hw can i do this.
Regards
Ali
|
|
|
|
|
|
i created crystal report,in that i use database expert option and crate new connection take one table from database(SQL SERVER 2005) and drag and drop some field,finally report is run,this is done in integrated security=true,
when that project i run on other local machine,report ask for login,so i wnt change connection string,how it to done?
|
|
|
|
|
Look under Settings.Settings in the proprties. Usaly connection string is saved there if you used automatic generated code
|
|
|
|
|
How to get free Library for Math graph 3D?
|
|
|
|
|
This forum is related to C# and other programming language from Microsoft. Use google
|
|
|
|
|
hi i have made an application which reads outlook events. while reading outlook events a warning popup comes with message "A program is trying to access your mail information...... " this is annoying for my users of application. Is there any way i can bypass this message i have useed Microsoft.Office.Interop.Outlook dll to read events. and code is written in c# .Net.
plz help
Thanks
|
|
|
|
|
Your code cannot bypass this message. Outlook has to be told to trust the code. Look under Tools -> Macro -> Security.
|
|
|
|
|
but how come google calendar sync does that. Do they have some collaboration or something.
|
|
|
|
|
Because it's not using the Outlook object model.
There is also a library ($$$) that solves the problem, but it is not free.
|
|
|
|
|
hello,everyone:
i'm a beginner of C#,i use crystal report do report.
Now,in my project,i use Dategridview to show datebase,the serach Condition is two
DataTimerPicker.now,i just want the dates which is searched to report,but everytime when i do the report,it'll report all the dates in my datebase,but i just want report some of them,no all!i know Crystal Report can do this job very good,but i do not know how to make my code,so please everyone show me some method or give some others to teach me!Very appriate!
Student miss YY
modified on Wednesday, January 6, 2010 9:51 PM
|
|
|
|