Last active
December 14, 2015 14:29
-
-
Save bernardobarreto/5100773 to your computer and use it in GitHub Desktop.
How to create an ods file using python tablib
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Bernardo B. Marques (bernardofire) 06/03/2013 | |
| #Dep: [sudo] pip install tablib | |
| def create_ods(data): | |
| data = tablib.Dataset(*data) | |
| with open('output.ods', 'wb') as f: | |
| f.write(data.ods) | |
| rows = [['Bernardo', 'Fire'], ['Quase', 'Nada'], ['Rick', 'Rocks', 'Sunshine']] | |
| create_ods(rows) | |
| #Done! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment