AGW Logo

agw_title 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 wx.grid.Grid.

hierarchy Inheritance Diagram

Inheritance diagram for: XLSTable

Inheritance diagram of XLSTable


method_summary Methods Summary

__init__Default class constructor.
GetAttrReturn the attribute for the given cell.
GetNumberColsReturns the number of columns in the table.
GetNumberRowsReturns the number of rows in the table.
GetRawValueReturns the “raw” value for the cell content.
GetValueReturns the cell content for the specified row and column.
SetValuesets the cell content for the specified row and column.

API Class API

class XLSTable(gridlib.PyGridTableBase)[source]

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



__init__(grid, cells, rows, cols)[source]

Default class constructor.

Parameters:
  • grid – an instance of wx.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(row, col, kind)[source]

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()[source]

Returns the number of columns in the table.



GetNumberRows()[source]

Returns the number of rows in the table.



GetRawValue(row, col)[source]

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(row, col)[source]

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(row, col, value)[source]

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.
Tree

Table Of Contents

Previous topic

XLSRichText

Next topic

XLSText