- - PR -
Excelのプロセス終了方法は??
«前のページへ
1|2|3
投稿者 | 投稿内容 |
---|---|
|
投稿日時: 2003-08-18 21:59
次のように入れ替えるだけでも、効果がありそうに思えるのは、安易でしょうか?
xlSheet.SaveAs("C:\\aaa.xls") xlBook.Close() xlApp.Quit() xlSheet = Nothing xlBook = Nothing xlApp = Nothing ↓ xlSheet.SaveAs("C:\\aaa.xls") xlSheet = Nothing xlBook.Close() xlBook = Nothing xlApp.Quit() xlApp = Nothing |
|
投稿日時: 2003-08-19 10:32
たくさんの返信有り難うございます。
過去レス及び皆様の意見を参考にし、無事プロセスが終了しました。 Sub TestExcel() Dim xlApp As New Excel.Application Dim xlBooks As Excel.Workbooks = xlApp.Workbooks Dim xlBook As Excel.Workbook = xlBooks.Open("c:\aaa.xls") xlApp.DisplayAlerts = False Dim xlSheets As Excel.Sheets = xlBook.Worksheets Dim xlSheet As Excel.Worksheet = CType(xlSheets(1), Excel.Worksheet) Dim xlRange As Excel.Range = xlSheet.Cells xlRange(2, 2) = "This is column B row 2" xlBook.Save() xlBook.Close(False) xlApp.DisplayAlerts = True xlApp.Quit() System.Runtime.InteropServices.Marshal.ReleaseComObject(xlRange) System.Runtime.InteropServices.Marshal.ReleaseComObject(xlSheet) System.Runtime.InteropServices.Marshal.ReleaseComObject(xlSheets) System.Runtime.InteropServices.Marshal.ReleaseComObject(xlBook) System.Runtime.InteropServices.Marshal.ReleaseComObject(xlBooks) System.Runtime.InteropServices.Marshal.ReleaseComObject(xlApp) End Sub |
|
投稿日時: 2003-09-30 09:49
[PRB] Visual Studio .NET クライアントで自動化した Office アプリケーションが終了しない
http://support.microsoft.com/default.aspx?scid=kb;ja;317109 |
«前のページへ
1|2|3