[python-win32] active excel workbook

Jens B. Jorgensen jens.jorgensen@tallan.com
Thu, 23 Jan 2003 11:51:07 -0600


Good question. I tried the same thing on my box and when I open an .xls 
file it shows up in the screen just like you'd expect. Perhaps you could 
call Activate() on the Workbook object returned from the Open() call?

stephan huijgen wrote:

>Hi I have this python program, it works but...
>the problem is i see nothing on the excel sheet..just a grey screen, like
>the one before you have opened a file. but when i do the print preview i see
>the desired sheet...
>what am i doing wrong?
>
>stephan
>
>
>from win32com.client import *
>################################################
>#file='D:\\MatlabR11\work\b777.xls'	#does not work because the file is not
>yet in right excel format
>################################################
>file='D:\\b777.xls'
>xlApp = Dispatch('Excel.Application')
>xlApp.Visible = 1
>xlApp.Workbooks.Open(file)
>#xlApp.Quit()
>del xlApp
>
>
>_______________________________________________
>Python-win32 mailing list
>Python-win32@python.org
>http://mail.python.org/mailman/listinfo/python-win32
>  
>

-- 
Jens B. Jorgensen
jens.jorgensen@tallan.com

"With a focused commitment to our clients and our people, we deliver value through customized technology solutions"