[Issue] Picture anchored to cell erratically moves

Discuss the spreadsheet application
Post Reply
giuvi
Posts: 49
Joined: Sun Dec 21, 2008 12:29 am

[Issue] Picture anchored to cell erratically moves

Post by giuvi »

It handles about an images added to a spreadsheet in AOO Calc 4.1.15 (OS: Linux, OpenSUSE 15.6).

I have a rather big spreadsheet, where I record my work activities in a year, sorted by day and time.
Direct after the end of every month I must report the work activities of the last month to my employer. For this I use filters to select the related records.

At the bottom of the monthly report there are some general information as some sums (work time, special allowances). In this "bottom area" there is also my signature, added as image and anchored to a cell in this area.
That means, when I filter the activities for a certain month, the the header and the bottom of report are both not hidden.

My Problem:
After filter selection as done, the picture with my signature moves to another position. Sometimes it slightly slips few centimetres, sometimes more rows over the original cell.

I did read many similar threads in this forum; i.e. Locking inserted images in place
viewtopic.php?f=9&t=29097#p298558

There Ken Johnson (2nd post) wrote:
"Calc cannot handle images. They will not move from there current cells when you do a sort."

and acknak (last post) wrote:
"Calc can anchor an image to a particular cell, but that's just a location relative to the spreadsheet grid. The image is not contained in the cell and it won't move with the cell content."

Well I see, AOO-Calc is not perfect and is no more maintained for many years, but in my case no cells are added or deleted; the image is anchored to a cell, which is never hidden, even if filters are used.

Does anybody know, how it is possible to let the image remain at the anchor cell, as Ken Johnson wrote?

giuvi
Last edited by MrProgrammer on Mon Jun 16, 2025 2:42 am, edited 1 time in total.
Reason: Add [Issue] to topic subject
AOO 4.1.15 on openSUSE Leap 15.5
User avatar
MrProgrammer
Moderator
Posts: 5261
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

Re: Despite of settings added picture to a spreadsheets erratically moves

Post by MrProgrammer »

giuvi wrote: Mon Jun 02, 2025 9:10 pm Does anybody know, how it is possible to let the image remain at the anchor cell
In 15 years all of the posts which I've seen about anchoring images to cells have come to the same conclusion: It is not possible to do that reliably in Calc. So the answer to your how is it possible question is You can't. You can use a database to store data and images or you can put your images in a directory on your computer and put hyperlinks to them in your spreadsheet cells.
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.7.5, iMac Intel.   The locale for any menus or Calc formulas in my posts is English (USA).
giuvi
Posts: 49
Joined: Sun Dec 21, 2008 12:29 am

Re: Despite of settings added picture to a spreadsheets erratically moves

Post by giuvi »

Hi MrProgrammer,

thanks for your advise!
Do you mean
Insert Picture -> From File ... in which the option "Link" is active?
AOO 4.1.15 on openSUSE Leap 15.5
User avatar
MrProgrammer
Moderator
Posts: 5261
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

Re: Despite of settings added picture to a spreadsheets erratically moves

Post by MrProgrammer »

giuvi wrote: Fri Jun 06, 2025 10:15 pm Do you mean: Insert Picture -> From File ... in which the option "Link" is active?
No. That would still display an image in your spreadsheet. As I understand the situation, anchoring an image to a cell sometimes causes a display problem. The image appears, but in the wrong location on the screen. People find that this feature is unreliable. The hyperlink technique puts text in the cell, not an image. You control what the text says. When you hover on the text the mouse pointer changes to a hand. Clicking the text will open the image in your computer's image application, not in Calc. If you want OpenOffice to display the image you must use a database, not a spreadsheet. I do not offer to assist with a database solution but you can find topics about it.

I meant use either:
• Insert → Hyperlink → Document → Path → Give address of file or use Open File button to browse → Text → Your choiceApply → Close → Enter
• The function =HYPERLINK(path;text)

The first method is a dialog. The second method uses a function in the cell.

For the first method be sure to press Enter after Close. Browsing with the Open File button will give you the correct syntax for the path. You must use the correct syntax for the file name in either method. For the HYPERLINK function you will use the same syntax, but because the function requires a character string you will put the file name in double quotes. By default the text which the function creates looks like any other cell text. But you can apply a style to the cell to control the text's appearance. For example you can have it underlined with a blue font. This is sample syntax for the function using a picture on my computer:
=HYPERLINK("file:///Users/Guest/Desktop/Cranberries%20and%20Guava.JPG";"Click me")

If this solved your problem please go to your first post use the Edit ✏️ button and add [Solved] to the start of the Subject field. Select the green checkmark icon at the same time.
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.7.5, iMac Intel.   The locale for any menus or Calc formulas in my posts is English (USA).
giuvi
Posts: 49
Joined: Sun Dec 21, 2008 12:29 am

Re: Despite of settings added picture to a spreadsheets erratically moves

Post by giuvi »

MrProgrammer wrote: Sat Jun 07, 2025 1:44 am
giuvi wrote: Fri Jun 06, 2025 10:15 pm Do you mean: Insert Picture -> From File ... in which the option "Link" is active?
(...) The hyperlink technique puts text in the cell, not an image. You control what the text says. When you hover on the text the mouse pointer changes to a hand. Clicking the text will open the image in your computer's image application, not in Calc. If you want OpenOffice to display the image you must use a database, not a spreadsheet. (...)
Sorry for my late reaction ...
I've already used many times your suggestion in other situations, but now it can't solve my issue, because the object to be load into the spreadsheet is an image of my signature and because I have to sent the monthly work time reports as PDF (a little part of the entire spreadsheet) via email to the employer and it neither has nor should have free access to my signature image file.

Question: it is possible to use a macro for this, where position and size parameters are predefined in the macro?
AOO 4.1.15 on openSUSE Leap 15.5
User avatar
Hagar Delest
Moderator
Posts: 33351
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Despite of settings added picture to a spreadsheets erratically moves

Post by Hagar Delest »

giuvi wrote: Fri Jun 13, 2025 7:02 am the object to be load into the spreadsheet is an image of my signature and because I have to sent the monthly work time reports as PDF (a little part of the entire spreadsheet) via email to the employer and it neither has nor should have free access to my signature image file.
If it is a standard PDF, then anyone can right click the image and retrieve it. Even if you add security options, screenshots can be made.
Thus, the signature is just for fun. If you want something stronger, then use a digital signature service.

Note that PDF tools can also add a kind of stamp made of a pic. For a professional look, use a svg graphic and avoid png or jpg that will show the pixels (and sometimes shades of gray when the signature has been scanned from a paper).
LibreOffice 25.2 on Linux Mint Debian Edition (LMDE Faye) and 24.8 portable on Windows 11.
giuvi
Posts: 49
Joined: Sun Dec 21, 2008 12:29 am

Re: Despite of settings added picture to a spreadsheets erratically moves

Post by giuvi »

Hi!
I've thought this critic point already on writing the post!
Yes, it is possible. And it is also possible to scan one's signature on paper and to misuse it.
Solution: no more sign.
AOO 4.1.15 on openSUSE Leap 15.5
User avatar
Hagar Delest
Moderator
Posts: 33351
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Despite of settings added picture to a spreadsheets erratically moves

Post by Hagar Delest »

OK, it was just to make sure.
Can you upload a sample file with dummy figures (see How to attach a document here)?

I tried with few data and filtering some rows moves the pic at the bottom upward, as expected (with LibreOffice). Thus, I don't really see the problem.

As a workaround, you can try the pic embedded as the background of the footer. But not that convenient.
LibreOffice 25.2 on Linux Mint Debian Edition (LMDE Faye) and 24.8 portable on Windows 11.
giuvi
Posts: 49
Joined: Sun Dec 21, 2008 12:29 am

Re: Despite of settings added picture to a spreadsheets erratically moves

Post by giuvi »

Hi!
attached you see a dummy spreadsheet with some notes on the top cells.

STRANGE: after created this calc file I noticed, the image added instead of signature, on the bottom of the report, near to subtotal does not move selecting cells (filtering) as experienced in original files in the last month.
Possible reason: not big file now?

ONLY FOR INFORMATION:
I use AOO not LO. I have explained my reasons already many times in other threads in this forum. Please, don't ask me again to change.
Attachments
Arb-Std. 2024 TEST.ods
(105.95 KiB) Downloaded 8 times
AOO 4.1.15 on openSUSE Leap 15.5
User avatar
Hagar Delest
Moderator
Posts: 33351
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Despite of settings added picture to a spreadsheets erratically moves

Post by Hagar Delest »

Here is what I see:
Sign_10.png
Sign_10.png (43.53 KiB) Viewed 285 times
Sign_11.png
Sign_11.png (29.42 KiB) Viewed 285 times
LibreOffice 25.2 on Linux Mint Debian Edition (LMDE Faye) and 24.8 portable on Windows 11.
giuvi
Posts: 49
Joined: Sun Dec 21, 2008 12:29 am

Re: Despite of settings added picture to a spreadsheets erratically moves

Post by giuvi »

YES, exactly what I see using the test file, but not the really used spreadsheet (= 1,82 MB).
So I really think, the issue occurs because the big file. In the real calc file only the tab, that you have seen contains more than 800 rows, 41 columns; the most with formulas; and about 20 cells text comments. Therefore there are many other tabs: some of them contains the background or complement data for the monthly report, the others are elaborations for checking data, payslip and similar.
BTW: The Graphic cache is set to 256 MB.
AOO 4.1.15 on openSUSE Leap 15.5
giuvi
Posts: 49
Joined: Sun Dec 21, 2008 12:29 am

Re: Despite of settings added picture to a spreadsheets erratically moves

Post by giuvi »

The real spreadsheet
without filtering:
Screenshot_01.png
Screenshot_01.png (37.47 KiB) Viewed 273 times

filtered:
Screenshot_02.png
Screenshot_02.png (93.08 KiB) Viewed 273 times
AOO 4.1.15 on openSUSE Leap 15.5
User avatar
Hagar Delest
Moderator
Posts: 33351
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Despite of settings added picture to a spreadsheets erratically moves

Post by Hagar Delest »

I'm wondering if the problem is not the anchor of the graphic. It may be anchored to a line that is filtered out, thus the text below moves up when the graphic doesn't.
If you move the graphic downward so that the anchor is in the RZ-Stunden cell, does it make a difference?
LibreOffice 25.2 on Linux Mint Debian Edition (LMDE Faye) and 24.8 portable on Windows 11.
giuvi
Posts: 49
Joined: Sun Dec 21, 2008 12:29 am

Re: Despite of settings added picture to a spreadsheets erratically moves

Post by giuvi »

It were a possibility, but it was already anchored to the RZ cell:

Screenshot_03.png
Screenshot_03.png (23.6 KiB) Viewed 258 times
Don't you think, it could depend on the file size?
AOO 4.1.15 on openSUSE Leap 15.5
User avatar
Hagar Delest
Moderator
Posts: 33351
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Despite of settings added picture to a spreadsheets erratically moves

Post by Hagar Delest »

Well, I don't think so but who knows.
Just in case, if you anchor the graphic to a cell on the line of Gesamt, any improvement?
Does it happen only when the extra text is missing: (*) davon...
LibreOffice 25.2 on Linux Mint Debian Edition (LMDE Faye) and 24.8 portable on Windows 11.
giuvi
Posts: 49
Joined: Sun Dec 21, 2008 12:29 am

Re: Despite of settings added picture to a spreadsheets erratically moves

Post by giuvi »

Hagar Delest wrote: Fri Jun 13, 2025 9:56 pm Just in case, if you anchor the graphic to a cell on the line of Gesamt, any improvement?
In order to get anchoring to the a cell in row of Gesamt, I had to mark a cell, that usually disappears after filtering (because the last one on the report before subtotal). Here:
Screenshot_04.png
Screenshot_04.png (25.13 KiB) Viewed 254 times
After the picture is moved in the right position, also the anchor moves:
Screenshot_04a.png
Screenshot_04a.png (27.01 KiB) Viewed 254 times
But no, no improvements.
Does it happen only when the extra text is missing: (*) davon...
The line with (*) davon ... does never hides through filtering. The cell I811 simply contains a nearly complex formula (IF + CONCATENATE). When the values of night and holidays work time = 0, the result is "", so in this case you don't see anything there.

With filter on and in case with (*) davon ...
Screenshot_04b.png
Screenshot_04b.png (36.17 KiB) Viewed 254 times
Now I came back to my previous question:
What about a macro, that downloads the picture from directory and set it in position and size parameters, predefined in the macro?
AOO 4.1.15 on openSUSE Leap 15.5
Alex1
Volunteer
Posts: 828
Joined: Fri Feb 26, 2010 1:00 pm
Location: Netherlands

Re: Despite of settings added picture to a spreadsheets erratically moves

Post by Alex1 »

In OpenOffice, if I select a value using the filter in any column, the image moves to the wrong place, and stays there if I select All.
No problems in LibreOffice, though I had to turn the filter off and on before it worked. If the filter hides row 779, the image is invisible.
AOO 4.1.15 & LO 24.8.4 on Windows 10
User avatar
Hagar Delest
Moderator
Posts: 33351
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Despite of settings added picture to a spreadsheets erratically moves

Post by Hagar Delest »

giuvi wrote: Fri Jun 13, 2025 10:41 pm In order to get anchoring to the a cell in row of Gesamt, I had to mark a cell, that usually disappears after filtering (because the last one on the report before subtotal). Here:

Screenshot_04.png

After the picture is moved in the right position, also the anchor moves
I meant to keep the pic anchored to the line with Gesamt, just to see if it works better. If so, that would tell that the problem is with the row where the pic is anchored.
BTW, is there a combination of your test file that shows the problem?
Because I couldn't reproduce it (except by hiding row 779 indeed).
LibreOffice 25.2 on Linux Mint Debian Edition (LMDE Faye) and 24.8 portable on Windows 11.
giuvi
Posts: 49
Joined: Sun Dec 21, 2008 12:29 am

Re: Despite of settings added picture to a spreadsheets erratically moves

Post by giuvi »

Hagar Deles wrote:
I meant to keep the pic anchored to the line with Gesamt, just to see if it works better. If so, that would tell that the problem is with the row where the pic is anchored.
In fact at last attempt the pic was anchored to the line with "Gesamt" (see screenshot_04.png on post Fri Jun 13, 2025 9:41 pm). And as already shown the result is not good (see screenshot_04b.png on post Fri Jun 13, 2025 9:41 pm)

Hagar Deles wrote:
BTW, is there a combination of your test file that shows the problem?
Because I couldn't reproduce it (except by hiding row 779 indeed)
No. As I have already written, with the test file I cannot reproduce the issue too. That's why I suspect a combination with the spreadsheet complexity.
"... except hiding row 779 indeed": I would say "obviously!" But the either the lines 777 til 782 nor any cell in the same lines are hidden or deleted, when I produce the monthly work report, as they belongs to "report foot"! So, I think, there is no need to explore with these lines.
AOO 4.1.15 on openSUSE Leap 15.5
User avatar
Hagar Delest
Moderator
Posts: 33351
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Despite of settings added picture to a spreadsheets erratically moves

Post by Hagar Delest »

I don't understand your screenshot 04 because with LO Calc, the anchor is in a top left corner of a cell,aligned with the top border of the pic. I can't have the anchor at the middle (height) of the pic. Maybe something specific to AOO Calc.
Well, quite at a loss here.
If you blank all the cells containing data, can you share the original file? Keeping the data that can filter the rows.
LibreOffice 25.2 on Linux Mint Debian Edition (LMDE Faye) and 24.8 portable on Windows 11.
cwolan
Posts: 165
Joined: Sun Feb 07, 2021 3:44 pm

Re: Despite of settings added picture to a spreadsheets erratically moves

Post by cwolan »

Maybe Issue 120506
(Flying object(the anchor is “to cell”) move to wrong position when hide some rows by filter or collapse).
OpenOffice 1.1.5 – 4.1.15
LibreOffice 3.3.0.4 – 25.2
Windows 7,10,11 64-bit
Post Reply