![]() If Excel should remain hidden and should close correctly then the workbooks unsaved changes need to be saved or ignored and there are Excel commands to do those. However there was unsaved changes in the workbook so a user prompt is shown but since Excel was hidden the prompt can't be seen and can't be clicked. Although I have not ran your code I believe what was happening was Excel was open and hidden a worksheet was created and it's values set, then a call to Quit() wasĬalled. If you still want Excel to be hidden then you can save the worksheet for them through Excel. I have that (xlApp.Quit() ) in my code and still having same problemĪs like Dereck suggested, now I am opeing the Excel file for user to view the report and save their prefered locationĭreaming a world without any war in anywhere ![]() Which will also release related objects such as workbook, worksheets.Ĭalling the realeaseObject stuff won't do harm, but is optional afaics.Īfaics all top-level Office-Automation objects have a Quit method You need to call the Quit-method of the excel application object:
0 Comments
Leave a Reply. |