OpenOffice Code snippets

Job ID: 36394010

Budget: $30 – $250 USD

Background
----------
I have an OpenOffice Calc file with multiple sheets.

One sheet contains a column with 10 rows (it's not formatted as a table, nor is it a named range, which I can do if it makes it easier to write the code snippets I need).

Each cell in that column contains a dynamically generated path to a .png file located on my local hard drive.

On a separate sheet, I have ten distinct "locations" where I would like to insert those pictures. It's a direct relationship that won't change: the .png file in cell "A1" will always be inserted in "location 1" on the other sheet; cell "B1"s .png file will always go into "location 2"; and so on. Again, that relationship doesn't change.

What DOES change are the .png files. I have over 150 .png files (not all exactly the same ... size, but within 2-3 pixels of each other H x W ... they all fit in the layout I've created).
A random set of ten .png files is dynamically generated outside the file; using that information, the paths are dynamically generated within the spreadsheet and placed in that column of 10 rows.

Requirement
-----------
A.

I need a piece of OpenOffice Basic code that would use that path information to insert the corresponding .png files into their appropriate places on the other sheet. I would associate that code to a button.

What I was thinking was some sort of loop (ignore the syntax ... I'm just trying to illustrate the logic):

dim path
dim location(0)
dim place

location(1)=sheet2.a5
location(2)=sheet2.a.25
location(3)=sheet2.a.45
(etc. etc. etc>

loop 1-10; for each (n) # 1-10:
path = value of cell sheet1.a(n)
place = location(n)
insert > picture > from file using path at place
next
end loop

Does that make sense?

If you use ranges in your code, I can go back and create those ranges. That way, you wouldn't need to worry about actual cell locations. Only thing I would need guidance on is if you would be able to use ranges for placing the photos or some sort of coordinates - I know graphics aren't put into the cells but are on another layer.

B.

I would also need code that would remove all 10 of those .png files and return the spreadsheet file to its original state (relative to the .png files) prior to generating another report. I would associate that code to a second button.

Unless you have me create ranges to accommodate your code, I will need to be able to modify the cell locations you use, along with instructions on how to do that, please.



I need this relatively quickly. This shouldn't be a big job for someone with good knowledge of OpenOffice Basic.



Please provide some info on your background in this type of work when you bid, please.



Thanks very much for your time!
Related categories: Visual Basic Excel Word Apache C++ Programming