1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110
|
.. wxPython Phoenix documentation
This file was generated by Phoenix's sphinx generator and associated
tools, do not edit by hand.
Copyright: (c) 2011-2018 by Total Control Software
License: wxWindows License
.. include:: headings.inc
.. currentmodule:: wx.lib.agw.xlsgrid
.. highlight:: python
.. _wx.lib.agw.xlsgrid.Excel:
==========================================================================================================================================
|phoenix_title| **wx.lib.agw.xlsgrid.Excel**
==========================================================================================================================================
A simple class that holds a COM interface to Excel.
By using the `win32com` module from Mark Hammonds' `pywin32` package, we
can manipulate various workbook/worksheet methods inside this class.
|
|class_hierarchy| Class Hierarchy
=================================
.. raw:: html
<div id="toggleBlock" onclick="return toggleVisibility(this)" class="closed" style="cursor:pointer;">
<img id="toggleBlock-trigger" src="_static/images/closed.png"/>
Inheritance diagram for class <strong>Excel</strong>:
</div>
<div id="toggleBlock-summary" style="display:block;"></div>
<div id="toggleBlock-content" style="display:none;">
<p class="graphviz">
<center><img src="_static/images/inheritance/wx.lib.agw.xlsgrid.Excel_inheritance.png" alt="Inheritance diagram of Excel" usemap="#dummy" class="inheritance"/></center>
</div>
<script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
<map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.lib.agw.xlsgrid.Excel.html" title="wx.lib.agw.xlsgrid.Excel" alt="" coords="5,5,171,35"/> </map>
</p>
|
|method_summary| Methods Summary
================================
================================================================================ ================================================================================
:meth:`~wx.lib.agw.xlsgrid.Excel.__init__` Default class constructor.
:meth:`~wx.lib.agw.xlsgrid.Excel.Close` Closes the Excel workbook, interrupting the COM interface.
:meth:`~wx.lib.agw.xlsgrid.Excel.GetCommentsRange` Returns a range of cells containing comments, using the VBA API.
:meth:`~wx.lib.agw.xlsgrid.Excel.GetText` Returns the WYSIWYG text contained in a cell.
================================================================================ ================================================================================
|
|api| Class API
===============
.. class:: Excel(object)
A simple class that holds a COM interface to Excel.
By using the `win32com` module from Mark Hammonds' `pywin32` package, we
can manipulate various workbook/worksheet methods inside this class.
.. method:: __init__(self, filename, sheetname)
Default class constructor.
:param `filename`: a valid Excel `.xls` filename;
:param `sheetname`: the worksheet name inside the Excel file (i.e., the label
on the workbook tab at the bottom of the workbook).
.. method:: Close(self, save=False)
Closes the Excel workbook, interrupting the COM interface.
:param `save`: ``True`` to save the changes you made to the workbook,
``False`` otherwise.
.. method:: GetCommentsRange(self)
Returns a range of cells containing comments, using the VBA API.
.. method:: GetText(self, row, col)
Returns the WYSIWYG text contained in a cell.
:param `row`: the row in which the cell lives;
:param `col`: the column in which the cell lives.
:note: The `row` and `col` parameters are not real Python index, as they
use the Excel indexing mode (i.e., first index is 1 and not 0).
|