[CALUG] Reading CSV using Python / PHP

Bryan Smith b.j.smith at ieee.org
Thu Apr 28 13:21:10 EDT 2016


Daniel Pais wrote:
> If these CSV worksheets will eventually be opened in Excel, you may
> wish to use python with xlrd/xlwt
> (http://www.simplistix.co.uk/presentations/python-excel.pdf). It has all the
> functionality you need to create worksheets with data organized in multiple
> tabs/sheets and can format the cells to look all pretty.  ;-)
> Hope this helps.

Just want to 2nd this ... use XML Stylesheets/Templates to apply style
to spreadsheets.

I.e., use CSV to dump your data, then Style it outside of the program.

I used to code the ODS (Calc) and XLSX (Excel X-gen) right in the
program (using the Perl/Python modules) to create both, until someone
pointed this out to me.  Serious forehead slapping moment.  ;)


--
Bryan J Smith  -  http://www.linkedin.com/in/bjsmith
E-mail:  b.j.smith at ieee.org  or  me at bjsmith.me



More information about the CALUG mailing list