Project Description
## Install

## Usage

## Syntax

### Functions

## Examples

## Adding more functions

Release History
## Release History

Download Files
## Download Files

Register a simplespreadsheet directive to do calculations in a table.

pip install rst_simplespreadsheet # or easy_install rst_simplespreadsheet

Use it as an extension to rst2pdf:

rst2pdf -e rst_simplespreadsheet ...

Formulae are pieces of text enclosed in ={…}. Only one formula per cell is supported.

The simplest formula is a number, like this:

={4}

This define the cell value to 4. A cell has value 0 (zero) unless it contains a formula.

You can reference the value of other cells using alphanumerical identifiers. Columns are identified using letters, from a to z then from aa to az, ba to bz and so on. Rows are identified using numbers. The first row is 1 and header rows are not numbered (thus not referenceable).

For example, the formula to calculate the product of cells a1 and a2 is:

={a1 * a2}

There are two special characters, # and @, used to reference the current row and the current column, respectively.

For example, to calculate the product of cells b and f on the current row:

={b# * f#}

and to calculate the sum of rows 1 and 2 in the current column:

={@1 + @2}

The spreadsheet can calculate cell values using Python functions. These functions have to be defined and registered in the SpreadSheet class first.

For now, only the function *sum* is defined:

={sum("a1:a20")}

You can do a simple table with totals like this one:

Qty | Rate | Price |
---|---|---|

2 | 1 $ | 2 $ |

4 | 3 $ | 12 $ |

1 | 5 $ | 5 $ |

3 | 7 $ | 21 $ |

Total |
40 $ |

with this code:

.. simplespreadsheet:: +------+--------+-------------------+ | Qty | Price | Total | +======+========+===================+ | ={2} | ={1} $ | ={a# * b#} $ | +------+--------+-------------------+ | ={4} | ={3} $ | ={a# * b#} $ | +------+--------+-------------------+ | ={1} | ={5} $ | ={a# * b#} $ | +------+--------+-------------------+ | ={3} | ={7} $ | ={a# * b#} $ | +------+--------+-------------------+ | *Total* | ={sum("c1:c4")} $ | +------+--------+-------------------+

For now, the only available function is sum(). You can easily add new functions by adding them to SpreadSheet.tools. Please share your improvements by forking the project on github: https://github.com/patrickfournier/simplespreadsheet

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help | Version | File Type | Upload Date |
---|---|---|---|

rst_simplespreadsheet-0.1.1.tar.gz (4.0 kB) Copy SHA256 Checksum SHA256 | – | Source | Nov 25, 2013 |