Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>For controlling Excel, use pywin32, like @igowen suggests.</p> <p>Note that it is possible to use static dispatch. Use <code>makepy.py</code> from the pywin32 project to create a python module with the python wrappers. Using the generated wrappers simplifies development, since for instance ipython gives you tab completion and help during development.</p> <p>Static dispatch example:</p> <pre> x:> makepy.py "Microsoft Excel 11.0 Object Library" ... Generating... Importing module x:> ipython </pre> <pre><code>&gt; from win32com.client import Dispatch &gt; excel = Dispatch("Excel.Application") &gt; wb = excel.Workbooks.Append() &gt; range = wb.Sheets[0].Range("A1") &gt; range.[Press Tab] range.Activate range.Merge range.AddComment range.NavigateArrow range.AdvancedFilter range.NoteText ... range.GetOffset range.__repr__ range.GetResize range.__setattr__ range.GetValue range.__str__ range.Get_Default range.__unicode__ range.GoalSeek range._get_good_object_ range.Group range._get_good_single_object_ range.Insert range._oleobj_ range.InsertIndent range._prop_map_get_ range.Item range._prop_map_put_ range.Justify range.coclass_clsid range.ListNames range.__class__ &gt; range.Value = 32 ... </code></pre> <p>Documentation links:</p> <ul> <li>The O'Reilly book <a href="http://my.safaribooksonline.com/1565926218" rel="noreferrer">Python Programming on Win32</a> has an <a href="http://my.safaribooksonline.com/1565926218/ch09-84996" rel="noreferrer">Integrating with Excel</a> chapter.</li> <li>Same book, free sample chapter <a href="http://oreilly.com/catalog/pythonwin32/chapter/ch12.html" rel="noreferrer">Advanced Python and COM</a> covers makepy in detail.</li> <li><a href="http://www.google.com/search?q=python+excel+tutorial" rel="noreferrer">Tutorials</a></li> <li><a href="http://docs.activestate.com/activepython/2.4/pywin32/html/com/win32com/HTML/docindex.html" rel="noreferrer">win32com documentation</a>, I suggest you read <a href="http://docs.activestate.com/activepython/2.4/pywin32/html/com/win32com/HTML/QuickStartClientCom.html" rel="noreferrer">this</a> first.</li> </ul>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload