Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Python
Hello friends,
Please help me by explaining how to load an Active-X DLL in
a Python program and how to used its functions in my Python program.
Posted 19-Jul-10 20:11pm

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Install the "Python for windows extensions" here:
 
http://sourceforge.net/projects/pywin32/[^]
 
And for example invoking excel will be possible:
 
import win32com.client
import pythoncom
 
xlApp = win32com.client.Dispatch("Excel.Application")
xlApp.Visible=1
 
workBook = xlApp.Workbooks.Open(r"C:\MyTest.xls")
print str(workBook.ActiveSheet.Cells(i,1))
workBook.ActiveSheet.Cells(1, 1).Value = "hello"                
workBook.Close(SaveChanges=0) 
xlApp.Quit()
Here a link for invoking ADO:
 
http://www.ecp.cc/pyado.html[^]
 
Good luck!
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 718
1 OriginalGriff 421
2 Tadit Dash 355
3 sanket saxena 329
4 Peter Leow 193
0 Sergey Alexandrovich Kryukov 12,109
1 OriginalGriff 7,326
2 Peter Leow 5,003
3 Abhinav S 4,003
4 Maciej Los 3,575


Advertise | Privacy | Mobile
Web02 | 2.8.140421.2 | Last Updated 23 Jul 2010
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Use
Layout: fixed | fluid