Python to Excell
David Rushby
woodsplitter at rocketmail.com
Mon Jul 22 15:38:48 EDT 2002
pixie888 at hotmail.com wrote
> ...
> I do not know the interface which is exposed by Excell. Can anybody help me
> further on this one?
Here's a post that I made some time ago on this subject:
http://groups.google.com/groups?selm=7876a8ea.0112061746.145c1e76%40posting.google.com&output=gplain
**Pay special attention to the URLs listed in that post; they link
to documentation of Excel's exposed object model.**
> ...writing a script which updates an Excell sheet...
The linked post explicitly demonstrates how to update an Excel
worksheet on a range-by-range (which could mean cell-by-cell) basis.
> ...and which prints it out then...
To print a WorkBook, use the PrintOut() method.
---
Also, Stefan's suggestion that you "use the macro recorder of excel
and translate it to python code" is good advice. Perhaps you don't
know this, but you can record a macro that does a small part of your
ultimate task, then look at the Visual Basic for Applications code
that the macro recorder generated and model your hand-written code on
it. That's the easiest way to learn the Excel object model
incrementally, though you should definitely still use the MSDN
documentation.
More information about the Python-list
mailing list