Skip to main content

Once defined, multiple ways to export table.

Project description

onetable

Once defined, multiple ways to export table.

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.

Files for onetable, version 0.0.4
Filename, size File type Python version Upload date Hashes
Filename, size onetable-0.0.4.tar.gz (7.8 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page