.. 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.XLSTable:

==========================================================================================================================================
|phoenix_title|  **wx.lib.agw.xlsgrid.XLSTable**
==========================================================================================================================================

The almost abstract base class for grid tables.

A grid table is responsible for storing the grid data and, indirectly, grid
cell attributes. The data can be stored in the way most convenient for the
application but has to be provided in string form to :class:`grid.Grid`.



|

|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>XLSTable</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.XLSTable_inheritance.png" alt="Inheritance diagram of XLSTable" usemap="#dummy" class="inheritance"/></center>
   <script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
   <map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.lib.agw.xlsgrid.XLSTable.html" title="The almost abstract base class for grid tables." alt="" coords="5,160,213,189"/> <area shape="rect" id="node3" href="wx.Object.html" title="This is the root class of many of the wxWidgets classes." alt="" coords="65,5,153,35"/> </map> 
   </p>
   </div>

|


|super_classes| Known Superclasses
==================================

:class:`wx.grid.GridTableBase`

|


|method_summary| Methods Summary
================================

================================================================================ ================================================================================
:meth:`~wx.lib.agw.xlsgrid.XLSTable.__init__`                                    Default class constructor.
:meth:`~wx.lib.agw.xlsgrid.XLSTable.GetAttr`                                     Return the attribute for the given cell.
:meth:`~wx.lib.agw.xlsgrid.XLSTable.GetNumberCols`                               Returns the number of columns in the table.
:meth:`~wx.lib.agw.xlsgrid.XLSTable.GetNumberRows`                               Returns the number of rows in the table.
:meth:`~wx.lib.agw.xlsgrid.XLSTable.GetRawValue`                                 Returns the "raw" value for the cell content.
:meth:`~wx.lib.agw.xlsgrid.XLSTable.GetValue`                                    Returns the cell content for the specified row and column.
:meth:`~wx.lib.agw.xlsgrid.XLSTable.SetValue`                                    sets the cell content for the specified row and column.
================================================================================ ================================================================================


|


|api| Class API
===============


.. class:: XLSTable(gridlib.GridTableBase)

   The almost abstract base class for grid tables.
   
   A grid table is responsible for storing the grid data and, indirectly, grid
   cell attributes. The data can be stored in the way most convenient for the
   application but has to be provided in string form to :class:`grid.Grid`.

   .. method:: __init__(self, grid, cells, rows, cols)

      Default class constructor.
      
      :param `grid`: an instance of :class:`grid.Grid`;
      :param `cells`: a Python dictionary. For every key `(row, col)`, the
       corresponding value is an instance of :class:`XLSCell`;
      :param `rows`: the number of rows in the table;
      :param `cols`: the number of columns in the table.


   .. method:: GetAttr(self, row, col, kind)

      Return the attribute for the given cell.
      
      :param `row`: the row in which this cell lives;
      :param `col`: the column in which this cell lives;
      :param `kind`: the kind of the attribute to return.


   .. method:: GetNumberCols(self)

      Returns the number of columns in the table. 


   .. method:: GetNumberRows(self)

      Returns the number of rows in the table. 


   .. method:: GetRawValue(self, row, col)

      Returns the "raw" value for the cell content.
      
      :param `row`: the row in which this cell lives;
      :param `col`: the column in which this cell lives.


   .. method:: GetValue(self, row, col)

      Returns the cell content for the specified row and column.
      
      :param `row`: the row in which this cell lives;
      :param `col`: the column in which this cell lives.


   .. method:: SetValue(self, row, col, value)

      sets the cell content for the specified row and column.
      
      :param `row`: the row in which this cell lives;
      :param `col`: the column in which this cell lives;
      :param `value`: the new value to assign to the specified cell.