Modifying an existing excel spreadsheet
Stefan Sonnenberg-Carstens
stefan.sonnenberg at pythonmeister.com
Mon Dec 20 23:25:46 EST 2010
Am 20.12.2010 22:56, schrieb Ed Keith:
> I have a user supplied 'template' Excel spreadsheet. I need to create a new excel spreadsheet based on the supplied template, with data filled in.
>
> I found the tools here http://www.python-excel.org/, and http://sourceforge.net/projects/pyexcelerator/. I have been trying to use the former, since the latter seems to be devoid of documentation (not even any docstrings).
>
>
> My first thought was to copy the template, open the copy, modify it and save the modifications. But it looks like if I open an existing spreadsheet it must be read only.
Could you post some code ? Did you try a simple file copy or do you
iterate over all the cells ?
> So I tried to open the template, copy it to a new spreadsheet and write the new spreadsheet, but I can't seem to copy the images, and it looks like copying the formatting is going to be difficult.
>
> Can anyone give me any tips or advice?
>
> Thanks in advance,
>
> -EdK
>
> Ed Keith
>
> e_d_k at yahoo.com
>
>
>
> Blog: edkeith.blogspot.com
>
>
>
As long as your program only needs to run under windows,
COM automation is IMHO the best solution.
Python tells Excel what to do.
More information about the Python-list
mailing list