Once defined, multiple ways to export table.
Project description
PMongo
A small Python MongoDB Document-Based access engine.
Install
pip install onetable
Useage
from onetable import DefualtTable, HtmlRender, XlsRender, XlsxRender, PdfRender, CSVRender
table = DefualtTable({'fontSize': 10, 'color': 'red'})
table.setStyles(
('x', {'fontSize': 14}),
('red', {'color': 'red'}),
('title', {'color': 'black', 'font': u'宋体', 'fontSize': 16, 'align': 'center'})
)
table.writeNextRowCols([('Title1', 3, 'title')])
table.pushStatus()
table.popStatus()
table.writeNextRowCols([1, 2, 3])
table.writeNextRowCols([3, 2, 1, 1], style='red')
with open('test.xls', 'wb') as out:
XlsRender().save(tab=table, out=out)
CHANGES
0.0.1
- first version
0.0.2
- add usage
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
onetable-0.0.2.tar.gz
(7.9 kB
view hashes)