Page 1 of 1 1
Topic Options
#181032 - 2007-10-02 04:37 PM Excel sheet(s) is(are) are invisible after editing through KIX
RomanB Offline
Fresh Scripter

Registered: 2006-10-20
Posts: 15
Loc: Bonn, Germany
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)

Top
#181134 - 2007-10-05 01:05 AM Re: Excel sheet(s) is(are) are invisible after editing through KIX [Re: RomanB]
Witto Offline
MM club member
*****

Registered: 2004-09-29
Posts: 1828
Loc: Belgium
No answers yet...
Maybe you could give a working example of your script?
 Code:
Break On
Dim $File; $objExcel
$File = "C:\Test\Table.xls"
$objExcel = GetObject($File).Application
;etc etc etc

Top
Page 1 of 1 1


Moderator:  Shawn, ShaneEP, Ruud van Velsen, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 1577 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.115 seconds in which 0.095 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org