# 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 grid.Grid.

## Class Hierarchy¶

Inheritance diagram for class XLSTable:

## Known Superclasses¶

wx.grid.GridTableBase

## Methods Summary¶

 __init__ Default class constructor. GetAttr Return the attribute for the given cell. GetNumberCols Returns the number of columns in the table. GetNumberRows Returns the number of rows in the table. GetRawValue Returns the “raw” value for the cell content. GetValue Returns the cell content for the specified row and column. SetValue sets the cell content for the specified row and column.

## 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 grid.Grid.

### Methods¶

__init__(self, grid, cells, rows, cols)

Default class constructor.

Parameters
• grid – an instance of grid.Grid;

• cells – a Python dictionary. For every key (row, col), the corresponding value is an instance of XLSCell;

• rows – the number of rows in the table;

• cols – the number of columns in the table.

GetAttr(self, row, col, kind)

Return the attribute for the given cell.

Parameters
• row – the row in which this cell lives;

• col – the column in which this cell lives;

• kind – the kind of the attribute to return.

GetNumberCols(self)

Returns the number of columns in the table.

GetNumberRows(self)

Returns the number of rows in the table.

GetRawValue(self, row, col)

Returns the “raw” value for the cell content.

Parameters
• row – the row in which this cell lives;

• col – the column in which this cell lives.

GetValue(self, row, col)

Returns the cell content for the specified row and column.

Parameters
• row – the row in which this cell lives;

• col – the column in which this cell lives.

SetValue(self, row, col, value)

sets the cell content for the specified row and column.

Parameters
• row – the row in which this cell lives;

• col – the column in which this cell lives;

• value – the new value to assign to the specified cell.