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

0.0.5

  • add background for xlsx

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.5.tar.gz (7.9 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page