Hi,
On Jun 15, 3:28 pm, John Machin <
sjmac...@lexicon.net> wrote:
> On Thursday, 16 June 2011 07:09:03 UTC+10, lzantal wrote:
>
> > I have a base spreadsheet file with image and header row color.
> > When I am using the copy function from xlutils and save the workbook
> > the image and the style are gone.
> > How could I copy over the styles? Here is the code I use for copying
> > '''
> > import xlrd, xlwt
> > from xlutils.copy import copy
>
> > cb = xlrd.open_workbook('test.xls', on_demand=True)
> > nb = copy(cb)
> > # add some values to it
> > nb.save('test_new.xls')
> > '''
>
> Losing styles: Read the xlrd docs on open_workbook(). Go
towww.python-excel.org, get the tutorial (link near the bottom of the page),
> read page 48.
>
> Losing image: xlutild.copy.copy() doesn't copy images.
Thank you.
Cell styles are coming over now.
Unfortunately according to that page the formulas are also not copied
over.
Would a custom filter be able to copy formulas and images over, or is
it a no go?
Thank you again
lzantal