Python and Excel

Charlie Taylor charlie at iwec.com
Wed Jan 19 21:04:31 EST 2005


 
If it helps, I started a similar project a few years ago on SourceForge when I 
was just learning python called python2xlw.  I haven't supported it for quite 
a while, however, I still use it a lot in my own work.

I needed to create Excel files with scatter charts in them for a web interface 
so I went through the excercise of disassembling the BIFF codes of the older 
XLW format of excel and creating a byte stream representation of the 
spreadsheet that could be saved to file or sent directly to the web user as an 
excel application in there browser.

  The newer XLS format is a bit more complex and I didn't have enough 
documentation to create the charts I needed directly from python in the newer 
XLS format.  (the current version of excel still understands XLW, however, so 
you're just a "SAVE AS" away from XLS.)

As I think was mentioned in another post, you can create charts etc. using the 
COM interface for a client-type application, however, my goal was to create 
them on-the-fly directly from the web server without launching a server-side 
excel application.

There is a nice Perl project called Spreadsheet::WriteExcel that John McNamara 
created that was very helpful to me at that time, however, it only created the 
worksheets, not charts.





More information about the Python-list mailing list