Page 1 of 1

Place images in a cell programmatically

Posted: Tue Aug 02, 2011 8:04 am
by hanifa
Hi, I have a following txt file of this format.

[location of image, values , values ,values ]

i.e /home/user/somefolder/a.jpg 12.0 22 11
/home/user/somefolder/b.jpg 12.0 3411
/home/user/somefolder/c.jpg 12.0 55 44
... upto 100 images even.

I like to create a new excel sheet with this format,

[actual image shown, values, values, values ]

i.e actualImageA 12.0 22 11
actualImageB 12.0 22 11

and so forth.

Does anyone have a script (if I can run from ubuntu terminal,it would be best) or something similar to accomplish this task ?
:)
Thanks all

Re: Place images in a cell programmatically

Posted: Tue Aug 02, 2011 8:24 am
by RoryOF
The source for
http://extensions.services.openoffice.o ... magination
might give you some clues.

Re: Place images in a cell programmatically

Posted: Tue Aug 02, 2011 9:00 am
by hanifa
hi RoryOF, thanks for the reply.
Two drawbacks for this extension :
Firstly, it doesnt align the pictures into the cell. Thus for multiple cells with url, when the images get downloaded, they are floating over other cells.. the cells dont resize to fit the images.
Secondly, it only works for URL. I put /home/user/a.jpg , but nothing get loaded.

More suggestions, thank again.

Re: Place images in a cell programmatically

Posted: Tue Aug 02, 2011 9:42 am
by Villeroy
For image manipultaion by script your Linux distribution provides a powerful tool named "display".

OOo comes with a database component which is able to show scaled images in an input form.
Calc (calculator) has never been designed to be an image viewer. Images in spreadsheets are meant to be decoration and illustration.

Download http://user.services.openoffice.org/en/ ... hp?id=8790
Exctract the directory.
Open the database document.
Open the form therein.

There you find a one-line script which updates the picture list which is a plain text file of flat file names.
A database table is linked to the plain text file.
The database table is linked to another database table with related information.