In this case, the solution was as follows:
- The .xlsx file was opened in Calc. (the original file)
- The content was exported to a temporary csv file.
- Everything was cleaned out in the csv file, (with Notepad++) except for the image links (http:// addresses)
- The temporary csv file was opened in a new spreadsheet (Calc)
- From this csv file, the http:// addresses of the original file were copied into a separate column. (then I can see the addresses)
Now it became possible to carry out the previously described steps
- Copy .: the link itself (http://…).
- Select .: Insert > Image
- Paste the link in the “Archive” field.
- Check the “Link” option.
And do this for all addresses (about 400)
In my case, I wrote a simple program in Autohotkey, which in any case performed each step of the sequence automatically.
The cell with the http address was highlighted and I pressed WinKey+n (and waited)
The program would have become more complicated if everything happened automatically.
#Requires Autohotkey 2.0
#SingleInstance Force
#n::
{ Send "{Ctrl down}c{Ctrl up}"
Send "{Left 7}"
Sleep 100
Send "!I"
Send "{Enter}"
Send "!n"
Send "{Tab}"
Send "{Ctrl down}V{Ctrl up}"
Send "!Ö"
Send "{Enter}"
Sleep 1000
Send "!B"
Send "{Enter}"
}
Since the images were of varying sizes, they could overlap. That meant I also wrote a small AHK program to handle the image sizes in Calc.
It was a bit more difficult to manage because the image had to be selected (not the cell the image was attached to)
#Requires Autohotkey 2.0
#SingleInstance Force
#n::
{ Click "Right"
Send "{Ctrl down}oo{Ctrl up}"
Send "{Enter}"
Sleep 100
Send "{Alt down}H{Alt up}2,5"
Send "{Alt down}O{Alt up}"
Send "{Up}"
}
In my case, I’m not interested in being able to “return” the images to the sender.
My wish remains, to either be able to see the image by clicking on a link
- or to see the image in the spreadsheet (which in this case was better).
As this feature is not built into LO Calc (currently)
Are there only a few options. (as I see it)
-
Is it possible to do this through an API to Calc? Where is information about this? (have written programs that handle both text and cells in Calc - but not this)
-
To write a more automatic script, similar to what I did. (writing a macro is maybe possibly - but I feel unsure how to handle problems)
-
???
-
Switch to MS Office… (which I want to avoid - if possible)