Re: Newbie: Win32 COM problem

2010-08-25 Thread Paul Hemans
Yes, that was it. I just needed to restart the host process. Thanks "Mark Hammond" wrote in message news:mailman.51.1282784920.29448.python-l...@python.org... > On 25/08/2010 10:33 PM, Paul Hemans wrote: >>File "C:\development\PyXLS\pyXLS.py", line 13, in createSheet >> def createBook(s

Re: Newbie: Win32 COM problem

2010-08-25 Thread Mark Hammond
On 25/08/2010 10:33 PM, Paul Hemans wrote: File "C:\development\PyXLS\pyXLS.py", line 13, in createSheet def createBook(self): AttributeError: WrapXLS instance has no attribute '_book' pythoncom error: Python error invoking COM method. Can anyone help? That line seems an unlikely sourc

Newbie: Win32 COM problem

2010-08-25 Thread Paul Hemans
Simple class to wrap the xlwt module for COM access pyXLS.py: from xlwt import Workbook class WrapXLS: _reg_clsid_ = "{c94df6f0-b001-11df-8d63-00e09103a9a0}" _reg_desc_ = "XLwt wrapper" _reg_progid_ = "PyXLS.Write" _public_methods_ = ['createBook','createSheet','writeSheetCell',

Re: win32 com problem

2006-12-05 Thread Mike P
No Problem, Thanks for your help so far, i've sent this problem off to SPSS as it seems it doesn't work on a work colleagues machine either Thanks for your time though Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: win32 com problem

2006-12-05 Thread John Machin
Mike P wrote: > Thanks for the quick reply, > > the code i am running is the following > > import win32com.client > xl = win32com.client.Dispatch("Excel.Application") > ppt = win32com.client.Dispatch("PowerPoint.Application") > ppt.Visible = 1 #open MS Powerpoint > xl.Visible = 1 #open MS Excel >

Re: win32 com problem

2006-12-05 Thread Mike P
Thanks for the quick reply, the code i am running is the following import win32com.client xl = win32com.client.Dispatch("Excel.Application") ppt = win32com.client.Dispatch("PowerPoint.Application") ppt.Visible = 1 #open MS Powerpoint xl.Visible = 1 #open MS Excel xl.Workbooks.Open('%s/working_out

Re: win32 com problem

2006-12-05 Thread John Machin
Mike P wrote: > I've got a slight problem when running an excel macro from python using > the win32.com.client module, in that it says it can't load the DLL file Does it? All I see is a message that it can't find a macro. > (it doesn't say which one) What happens when you run the macro from the

win32 com problem

2006-12-05 Thread Mike P
I've got a slight problem when running an excel macro from python using the win32.com.client module, in that it says it can't load the DLL file (it doesn't say which one) and gives me the following error message Traceback (most recent call last): File "", line 93, in ? File ">", line 14, in R