Python script that writes to an Excel file

Neil Hodgson nhodgson at bigpond.net.au
Mon Jul 29 19:17:52 EDT 2002


Stephen Boulet:

> What if you wanted to do things like make a tabbed spreadsheet (tabs on
> the bottom that break up a notebook int subparts, not '\t'), is this
> possible with csv format?

   Recent versions of Excel can use an XML based file format. My advice
would be to create a document that is much like you want to write from
Python and decipher the XML enough to work out where you need to change.
Then write templating code that can insert your data (wrapping each element
in some XML) along with the rest of the XML from the saved file.

http://msdn.microsoft.com/library/en-us/dnexcl2k2/html/odc_xlsmlinss.asp

   Neil






More information about the Python-list mailing list