pyExcelerator Protection insert_bitmap

27 views
Skip to first unread message

pythonwin pythonwin

unread,
Jun 7, 2007, 7:22:48 AM6/7/07
to python...@googlegroups.com
Good evening!

say, please, as in *.xls to insert an unscreened picture?

example: image.py


but a picture in OpenOficce is not represented :(

OS - windows XP, debian etch
pyExcelerator 0.6.3a-1
image.py

John Machin

unread,
Jun 7, 2007, 6:05:13 PM6/7/07
to python-excel

On Jun 7, 9:22 pm, "pythonwin pythonwin" <pythonwin...@gmail.com>
wrote:

> image.py
> 1KDownload

The problem is not related to "Protection". The simple no-protection
image.py from the examples directory of the pyExcelerator distribution
has the same problem:

[Windows XP Pro SP 2, Python 2.5.1, OOo Calc 2.1, Gnumeric 1.7.6,
Excel 2003]

1. The output XLS file is displayed correctly by Excel but not by OOo
and Gnumeric.

2. After opening by Excel and saving a copy: the Excel-saved file is
displayed correctly by OOo and Gnumeric.

Looks like Excel is tolerating aberration(s) but OOo and Gnumeric
aren't.

TO DO:
* Report problem to OOo and Gnumeric
* Examine dumps of the 2 XLS files to determine the _essential_
difference(s)
* Read Microsoft & OOo docs
* Examine source code of OOo and Gnumeric
* Determine minimal set of sufficient changes to pyExcelerator and
xlwt [same code; I haven't touched it]
* Python 2.5 issues four deprecation warnings (passing a float to a H-
format (unsigned 16-bit integer) item in struct.pack) -- should
determine whether to round down / up / nearest and then pass as int

Looks like a job for one or more cold wet Sunday afternoons to me ...
any volunteers with a critical need and/or a surfeit of cold wet
Sunday afternoons?

Cheers,
John

Roman V. Kiseliov

unread,
Jun 20, 2007, 2:27:57 PM6/20/07
to python...@googlegroups.com
Protection is not a problem.
 
pyExcelerator uses OBJ record for saving pictures. But OO needs
Esher layer (this is couple of records and subrecords for drawing, pictures,
autofigures, etc. first appeared in Office 97).
Implementing Esher layer -- right way for pyExcelerator and xlwt.
If I have some time about Xmas maybe I'll do it done for pyExcelerator.
 
Lots of stuff about this annoying layer you can find inside Jacarta -- (HSSF, HWPF, ...) 
sources released by Apache Foundation. Of course also in OO sources as well...
 
WBR,
Roman V. Kiseliov
 
2007/6/7, pythonwin pythonwin <python...@gmail.com>:
Reply all
Reply to author
Forward
0 new messages