That's interesting. If you can post a 1-cell spreadsheet demonstrating
this, we can take a look...
> 2 - when I write in a cell in the copy, the original cell style is
> lost.
Yes, when you write to a cell, the formatting *and* value are
overwritten. It would be nice to be able to have the default value to
the style parameter of the write methods mean "leave as currently is"
rather than "use the default style"... I suspect this change would need
funding...
In the meantime, just create a new style that matches the existing one
using easy_xf and you'll be fine. I'd suggest reading the section on
writing excel files with xlwt in the tutorial on
http://www.python-excel.org.
cheers,
Chris
--
Simplistix - Content Management, Batch Processing & Python Consulting
- http://www.simplistix.co.uk
Does xlrd read these attributes? Can xlwt write them? If the answer to
both is yes, then it's an xlutils feature request and you need to bug
(and preferably find funding for) me.
If the answer to either is "no", then they need to be working first.
Bugging John, or failing that me, would be needed...
> And the same question about formulas - can we expect xlutils.copy to
> copy formulas instead of calculated values as well?
That's a definite "not until xlrd supports reading them"... I believe
John has some experimental code for this, but I don't know how far it is
from being ready for the prime time...