_ExcelBookClose ohne Wirkung > erst wenn das Autoit Programm geschlossen wird, wird Excel geschlossen,
wie kann ich Excel mit _ExcelBookClose sauber schließen, ohne es über Process close schließen zu müßen?
Danke für die Hilfe
_ExcelBookClose ohne Wirkung > erst wenn das Autoit Programm geschlossen wird, wird Excel geschlossen,
wie kann ich Excel mit _ExcelBookClose sauber schließen, ohne es über Process close schließen zu müßen?
Danke für die Hilfe
Vielleicht funktioniert _ExcelClose nicht sauber. Um das zu klären, sollten wir noch zusätzliche Infos haben:
Windows 7 x64 - Office 2010 x32
Windows und Office sehen gut aus.
Welche Autoit Version verwendest Du?
habe das problem in dem beispiel auch!
[autoit]
$sFilePath1 = "D:\Data\Sonstiges\Kategorien.xls" ;This file should already exist
$oExcel = _ExcelBookOpen($sFilePath1)
If @error = 1 Then
MsgBox(0, "1 Error!", "Unable to Create the Excel Object")
Exit
ElseIf @error = 2 Then
MsgBox(0, "1 Error!", "File does not exist - Shame on you!")
Exit
EndIf
$aArray = _ExcelReadSheetToArray($oExcel,1) ;Using Default Parameters
_ExcelBookClose($oExcel, 0)
_ArrayDisplay($aArray, "Array using Default Parameters")
[/autoit]im englischen forum gibts das thema + lösung schon!
http://www.autoitscript.com/forum/topic/11…close-problems/
_ExcelBookClose does not release object $oExcel, AutoIt automatically
releases objects on script exit but if you need the xls file to be
accessible before the script exits, you must specifically delete the
object.
#include <excel.au3>
[/autoit][autoit][/autoit][autoit]$oExcel = _ExcelBookNew(0)
_ExcelWriteCell($oExcel, "test 123", 1, 1)
_ExcelBookSaveAs($oExcel, "c:\temp\test.xls")
_ExcelBookClose($oExcel)
$oExcel = 0 ; delete object
MsgBox(0, "blah", "blah")
[/autoit]gruß gmmg
Ah, dachte ich mir doch, dass es im engl. Forum eine Lösung gibt.
stimmt danke
hat super geklappt