Click here to Skip to main content
14,578,769 members
   

C#

 
QuestionEnable Apply button when needed Pin
JoZ CaVaLLo23-Jul-08 23:57
MemberJoZ CaVaLLo23-Jul-08 23:57 
AnswerRe: Enable Apply button when needed Pin
Christian Graus24-Jul-08 0:03
mveChristian Graus24-Jul-08 0:03 
AnswerRe: Enable Apply button when needed Pin
N a v a n e e t h24-Jul-08 0:07
MemberN a v a n e e t h24-Jul-08 0:07 
AnswerRe: Enable Apply button when needed Pin
nelsonpaixao24-Jul-08 14:23
Membernelsonpaixao24-Jul-08 14:23 
Questioncrysatal reports Pin
lankaudaranga23-Jul-08 23:31
Memberlankaudaranga23-Jul-08 23:31 
Questionunable to kill com object Pin
Mogaambo23-Jul-08 22:23
MemberMogaambo23-Jul-08 22:23 
AnswerRe: unable to kill com object Pin
0x3c024-Jul-08 0:18
Member0x3c024-Jul-08 0:18 
GeneralRe: unable to kill com object Pin
Mogaambo24-Jul-08 1:28
MemberMogaambo24-Jul-08 1:28 
// I have used this function still problem persists


protected void killExcel(Microsoft.Office.Interop.Excel.Application exc)
{
try
{
List<microsoft.office.interop.excel.workbook> wbs = new List<microsoft.office.interop.excel.workbook>();
List<microsoft.office.interop.excel.worksheet> wss = new List<microsoft.office.interop.excel.worksheet>();
foreach (Microsoft.Office.Interop.Excel.Workbook wb in exc.Workbooks)
{
foreach (Microsoft.Office.Interop.Excel.Worksheet ws in wb.Worksheets)
wss.Add(ws); // collect worksheets
wbs.Add(wb); // collect workbooks
}
for (int i = 0; i < wss.Count; i++)
{
wss[i].Delete();
System.Runtime.InteropServices.Marshal.ReleaseComObject(wss[i]); // release it
wss[i] = null; // null it
}
for (int i = 0; i < wbs.Count; i++)
{
wbs[i].Close(null, null, null);
System.Runtime.InteropServices.Marshal.ReleaseComObject(wbs[i]); // release it
wbs[i] = null; // null it
}
exc.Workbooks.Close(); // so you can close this
exc.Quit(); // so you can quit this
System.Runtime.InteropServices.Marshal.ReleaseComObject(exc); // release it
exc = null;
GC.Collect(); // this sets up the finalizers
GC.WaitForPendingFinalizers();
GC.Collect(); //apparently this kills it
GC.WaitForPendingFinalizers();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
// deal with it fool!
}
}
AnswerRe: unable to kill com object Pin
stancrm24-Jul-08 2:48
Memberstancrm24-Jul-08 2:48 
AnswerRe: unable to kill com object Pin
JoeRip24-Jul-08 10:54
MemberJoeRip24-Jul-08 10:54 
GeneralRe: unable to kill com object Pin
JoeRip24-Jul-08 12:16
MemberJoeRip24-Jul-08 12:16 
QuestionIs DBF table ANSI? Pin
JoZ CaVaLLo23-Jul-08 21:42
MemberJoZ CaVaLLo23-Jul-08 21:42 
AnswerRe: Is DBF table ANSI? Pin
Guffa23-Jul-08 23:22
MemberGuffa23-Jul-08 23:22 
GeneralRe: Is DBF table ANSI? Pin
JoZ CaVaLLo23-Jul-08 23:35
MemberJoZ CaVaLLo23-Jul-08 23:35 
Questionprint a forms textbox data with out its background [modified] Pin
Anu Palavila23-Jul-08 21:31
MemberAnu Palavila23-Jul-08 21:31 
AnswerRe: print a forms textbox data with out its background Pin
teejayem24-Jul-08 2:30
Memberteejayem24-Jul-08 2:30 
QuestionCan't find PInvoke DLL 'dbnetlib.dll Pin
harcaype23-Jul-08 21:21
Memberharcaype23-Jul-08 21:21 
AnswerRe: Can't find PInvoke DLL 'dbnetlib.dll Pin
Christian Graus23-Jul-08 23:39
mveChristian Graus23-Jul-08 23:39 
AnswerRe: Can't find PInvoke DLL 'dbnetlib.dll Pin
harcaype24-Jul-08 2:01
Memberharcaype24-Jul-08 2:01 
Questioncalling c# library in java through JNI Pin
kapilbansal8923-Jul-08 20:39
Memberkapilbansal8923-Jul-08 20:39 
QuestionOnBeforeInstall and OnAfterInstall Events of the Configuration.Install.Installer class are not raised Pin
Shrikant Gujar23-Jul-08 20:15
MemberShrikant Gujar23-Jul-08 20:15 
AnswerRe: OnBeforeInstall and OnAfterInstall Events of the Configuration.Install.Installer class are not raised Pin
Eduard Keilholz24-Jul-08 1:02
MemberEduard Keilholz24-Jul-08 1:02 
Questioniterating in excel sheet Pin
Mogaambo23-Jul-08 19:58
MemberMogaambo23-Jul-08 19:58 
AnswerRe: iterating in excel sheet Pin
Jimmanuel24-Jul-08 3:19
MemberJimmanuel24-Jul-08 3:19 
Questionc# Pin
lankaudaranga23-Jul-08 19:07
Memberlankaudaranga23-Jul-08 19:07 

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.