엑셀을 읽고 종료하는데 종료후에도 프로세스가 살아 있습니다.
10.3.1 사용하고 있습니다.
종료시에 다른 코드가 들어가야 하나요?
WideString filename = "D:\\DebugBook1.xlsx";
// Excel's Application Object
Variant xlApp = Variant::CreateObject("Excel.Application");
xlApp.OlePropertySet("DisplayAlerts", false);
xlApp.OlePropertySet("Visible", false);
Variant xlBooks = xlApp.OlePropertyGet("Workbooks");
xlBooks.OleProcedure("Open", filename);
Variant xlBook = xlBooks.OlePropertyGet("Item", 1);
Variant xlSheets = xlBook.OlePropertyGet("Worksheets");
xlBook.OleProcedure("Save");
xlBooks.OleProcedure("Close");
xlApp.OleProcedure("Quit");
// xlSheet = Unassigned;
xlSheets = Unassigned;
xlBook = Unassigned;
xlBooks = Unassigned;
xlApp = Unassigned;
|