Update:
Found a workaround for my problem. Don't know, if the problem was my object handling (which means lack of knowledge :-) or excel or kix reasons. Obviously there's a difference between
- referencing the file object directly and
- referencing the file object through the application object.
Several UDF libs in this forum helped me trying out different syntax. Thanks to the guys who wrote them. I posted the significant lines below.
Hi all,
using latest kix 4.53 I'm facing the following problem, regarding Excel 2003. Each time I successfully edit a certain column of a specified sheet, the workbook is INVISIBLE when I open it the next time. I always have to go manually via windows -> "einblenden ..." (german word for "making visible"). After that and after saving the file its allright. What can I do? Already tried using the "visible" method without success.


The working code:
 Code:
break on

dim $excelfile,$pfad,$excelObj,$xlAppObj

$pfad = "G:\Projekte\Aktuell\"
$excelfile = $pfad + "Serverliste.xls"

;set object handle
$xlAppObj = createobject('EXCEL.Application')

;open File
$xlAppObj.Workbooks.Open($excelfile)

;set object handle for file
$excelObj = $xlAppObj.ActiveWorkbook

....

$excelObj.Save
$excelObj.Close
$xlAppObj.Quit

exit


The not working code:
 Code:
;Autor: Roman 2007
break on

dim $excelfile,$pfad,$excelObj,$xlAppObj

$pfad = "G:\Projekte\Aktuell\"
$excelfile = $pfad + "Serverliste.xls"

;Objekt Handle setzen
$excelObj = getobject($excelfile)

$excelObj.Save
exit


Edited by RomanB (2007-10-09 03:38 PM)