How to use xlwt to write data to an existing excel file

110 views
Skip to first unread message

srk

unread,
Apr 10, 2009, 8:43:50 PM4/10/09
to python-excel
How do i use xlwt to write data to an existing excel file?
thanx in advance

-srk

Chris Withers

unread,
Apr 11, 2009, 5:58:57 AM4/11/09
to python...@googlegroups.com
srk wrote:
> How do i use xlwt to write data to an existing excel file?
> thanx in advance

xlutils.copy will give take an xlrd.Book object and give you an
xlwt.Workbook instance, but inserting a row may be a little tricky.

I guess this is something that xlwt could grow, but it'd need patching
or funding to make it happen.

I should note that *appending* rather than *inserting* a row is pretty
easy once you've used xlutils.copy

Chris

--
Simplistix - Content Management, Zope & Python Consulting
- http://www.simplistix.co.uk

Reply all
Reply to author
Forward
0 new messages