[python-win32] ActiveSheets and excel
Fabricio Guzman
fguzman_slotown at yahoo.com
Tue Sep 28 17:14:35 CEST 2004
The "exapp" object is available to the user once the
the plug-in attaches itself to excel through the
OnConnection callback method of the IDTExtensibility2
interface. It is in the callback's first argument,
usally called "application" of type Object.
Once you have a reference to this object you can manip
excel as you wish. Hope this helps.
-Fabricio
--- Graeme Glass <graemeglass at gmail.com> wrote:
> When dispatching your own instance of excel, it is
> pretty straight
> forward to access the workbook and ActiveSheets by
> way of the
> Excel.Application object, in this case exapp.
> eg:
>
> exapp =
> win32com.client.Dispatch("Excel.Application")
> exapp.Visible = 1
> exapp.Workbooks.Add()
> exapp.ActiveSheet.Cells(1,1).Value = 'hello'
>
> my question is, how does one add, remove workbooks,
> and access
> ActiveSheets from with excel by means of an Addin? I
> have been
> attempting to access it throught what i thought was
> the application
> interface in the plugin but it is not :-)
> So i currently stand with a plugin button that can
> bring up message
> boxes and frames but not do anything really usefull.
> Any help would be
> very much appreciated.
>
> Thanks, Graeme
> _______________________________________________
> Python-win32 mailing list
> Python-win32 at python.org
> http://mail.python.org/mailman/listinfo/python-win32
>
__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail
More information about the Python-win32
mailing list