Click here to Skip to main content
15,893,487 members
Home / Discussions / C#
   

C#

 
AnswerRe: Code editor is not organizing my code Pin
Colin Angus Mackay30-Jan-06 0:34
Colin Angus Mackay30-Jan-06 0:34 
GeneralRe: Code editor is not organizing my code Pin
NewbieDude30-Jan-06 0:54
NewbieDude30-Jan-06 0:54 
GeneralRe: Code editor is not organizing my code Pin
Sebastian Schneider30-Jan-06 1:03
Sebastian Schneider30-Jan-06 1:03 
GeneralRe: Code editor is not organizing my code Pin
leppie30-Jan-06 1:40
leppie30-Jan-06 1:40 
QuestionC#,Close Excel whitout the save as dialog Pin
jzb29-Jan-06 20:43
jzb29-Jan-06 20:43 
AnswerRe: C#,Close Excel whitout the save as dialog Pin
Guffa29-Jan-06 21:02
Guffa29-Jan-06 21:02 
AnswerRe: C#,Close Excel whitout the save as dialog Pin
AB777129-Jan-06 23:11
AB777129-Jan-06 23:11 
GeneralRe: C#,Close Excel whitout the save as dialog Pin
jzb30-Jan-06 20:14
jzb30-Jan-06 20:14 
I post the message in message boards, after this I try to use worksheet.saveas method that save to my driver, then close the worksheet.
app.Workbooks[1].SaveAs(@"c:\temp.xls", Missing.Value, Missing.Value,
Missing.Value,Missing.Value,Missing.Value,
Microsoft.Office.Interop.Excel.XlSaveAsAccessMode.xlNoChange,
Missing.Value,Missing.Value, Missing.Value, Missing.Value, Missing.Value);

app.Application.Workbooks.Close();
app.Application.Quit();
app.Quit();
System.Runtime.InteropServices.Marshal.ReleaseComObject (app);

the work sheet been closed, but the process still in task manager until my application been closed. Why?
so ,I more wrote code
Process[] procs = Process.GetProcessesByName("EXCEL");
foreach (Process proc in procs)
{
if (!proc.CloseMainWindow())
{
proc.Kill();
}
}
GC.Collect();
app = null;
At last, the excel porcess been disappeared in task manager.
AnswerRe: C#,Close Excel whitout the save as dialog Pin
Drew McGhie30-Jan-06 3:35
Drew McGhie30-Jan-06 3:35 
QuestionPassing Data Pin
bootn29-Jan-06 17:15
bootn29-Jan-06 17:15 
AnswerRe: Passing Data Pin
Colin Angus Mackay29-Jan-06 17:40
Colin Angus Mackay29-Jan-06 17:40 
GeneralRe: Passing Data Pin
bootn29-Jan-06 17:51
bootn29-Jan-06 17:51 
GeneralRe: Passing Data Pin
Colin Angus Mackay29-Jan-06 18:04
Colin Angus Mackay29-Jan-06 18:04 
GeneralRe: Passing Data Pin
bootn29-Jan-06 20:15
bootn29-Jan-06 20:15 
QuestionThread NOT aborting nicely!!!! Pin
WetRivrRat29-Jan-06 17:13
WetRivrRat29-Jan-06 17:13 
AnswerRe: Thread NOT aborting nicely!!!! Pin
leppie29-Jan-06 18:34
leppie29-Jan-06 18:34 
GeneralRe: Thread NOT aborting nicely!!!! Pin
WetRivrRat30-Jan-06 2:32
WetRivrRat30-Jan-06 2:32 
GeneralRe: Thread NOT aborting nicely!!!! Pin
WetRivrRat30-Jan-06 3:59
WetRivrRat30-Jan-06 3:59 
QuestionRefreshing DataSet Pin
emran83429-Jan-06 13:57
emran83429-Jan-06 13:57 
AnswerRe: Refreshing DataSet Pin
imsathy29-Jan-06 20:12
imsathy29-Jan-06 20:12 
GeneralRe: Refreshing DataSet Pin
emran83430-Jan-06 5:58
emran83430-Jan-06 5:58 
AnswerRe: Refreshing DataSet Pin
Drew McGhie30-Jan-06 3:38
Drew McGhie30-Jan-06 3:38 
GeneralRe: Refreshing DataSet Pin
emran83430-Jan-06 6:14
emran83430-Jan-06 6:14 
GeneralRe: Refreshing DataSet Pin
Drew McGhie30-Jan-06 10:15
Drew McGhie30-Jan-06 10:15 
GeneralRe: Refreshing DataSet Pin
emran83430-Jan-06 11:52
emran83430-Jan-06 11:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.