This section contains some information about module development - in a case you want to contribute to it. Which is welcome, btw.
Project uses distribute Since the package already contains the dependencies to Paver, the basic building can be done as follows:
python setup.py bdist_egg sdist_src
However, installation of the paver is strongly suggested. After installation, the documentation, building and packaging can be all in once:
To build just the documentation, run:
Project repository comes with ready-made configuration for both of the tools, which are used automatically.
This section provides some further information about internals of the module:
ExcelTableDirective implements the exceltable -directive.
ExcelTableDirective implements the directive. Directive allows to create RST tables from the contents of the Excel sheet. The functionality is very similar to csv-table (docutils) and xmltable (sphinxcontrib.xmltable).
Example of the directive:
.. exceltable:: :file: path/to/document.xls :header: 1
Class generates the list based table from the given excel-document, suitable for the directive.
Class also implements the custom query format, is to use for the directive.:
>>> import os >>> from sphinxcontrib import exceltable >>> >>> fo = open(os.path.join(os.path.dirname(exceltable.__file__),'../doc/example/cartoons.xls'), 'r+b') >>> et = exceltable.ExcelTable(fo) >>> >>> table = et.create_table(fromcell='A1', tocell='C4') >>> assert et.fromcell == (0, 0) >>> assert et.tocell == (2,3) >>> >>> table = et.create_table(fromcell='B10', tocell='B11', sheet='big') >>> assert et.fromcell == (1,9) >>> assert et.tocell == (1,10)
Creates a table (as a list) based on given query and columns
Name or index of the sheet as string/unicode. The index starts from the 0 and is the default value. If numeric value is given, provide it in format:
et.create_table(fromcell='A1', tocell='B2', sheet='2')
The software is licensed with liberal MIT license, making it suitable for both commercial and open source usage:
The MIT License
Copyright (c) 2009 Juha Mustonen
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.