On Feb 1, 4:37 am, Stephen Brown <[EMAIL PROTECTED]> wrote: > Yes indeed, pyExcelerator does support reading data from excel > spreadsheets.
I presume this is an orphaned and belated reply to the 3-message thread in July 2006 with the same subject. > An example of how to do this is included in the file > xls2csv-gerry.py under the directory ... pyExcelerator/examples/tools > Syntax is pretty straight forward. extract_all = parse_xls(filename, CP > = None) where CP is the encoding format used within tht file. The OP was aware of pyExcelerator's parse_xls, but required formatting information: """ To me it seems, that pyExcelerator does not support the reading for modification of an Excel-sheet. It allows only the "parse_xls" but I would like to keep the "formatting" in the template. """ > Uses > same codes that xlrd uses, ie 'cp437' = US English. An interesting way of describing it. It is *not* restricted to being a "codepage". The arg can be any Python-supported encoding that can be passed to str.decode to convert internal 8-bit strings to unicode. > > All you need is the "parse_xls" command and simply let it iterate > through your spreadsheet file. [snip] Current situation: I am (sporadically) maintaining xlwt, a fork of pyExcelerator which among other things fixes bugs and enables use with Python 2.3. It is available from https://secure.simplistix.co.uk/svn/xlwt/trunk xlwt.parse_xls is the same as pyExcelerator.parse_xls and thus has the same deficiencies e.g. it reports a date as a floating-point number of days since some more-or-less-fixed epoch and provides no indication that the item should be interpreted as a date. It will not be maintained, and is severely deprecated -- use xlrd instead. HTH, John -- http://mail.python.org/mailman/listinfo/python-list