[Solved] Insert image and set to cell size

Discuss the spreadsheet application
Locked
bob.the.train
Posts: 3
Joined: Thu Oct 08, 2026 11:43 pm

[Solved] Insert image and set to cell size

Post by bob.the.train »

Hello All,
I'm trying to insert an image in Calc and I'd like it to snap to the cell limits. Is there any way of doing this? Cheers.
Last edited by MrProgrammer on Mon Oct 26, 2026 5:21 pm, edited 3 times in total.
Reason: Tagged ✓ [Solved]
OpenOffice 4.1.16 on Windows 10
Bidouille
Volunteer
Posts: 713
Joined: Mon Nov 19, 2007 10:58 am
Location: France

Re: Snap to cell

Post by Bidouille »

bob.the.train wrote: Thu Oct 08, 2026 11:47 pm insert an image in Calc and I'd like it to snap to the cell limits
Next time, have a search in the forum. Your question has already been asked:
custom cell background
bob.the.train
Posts: 3
Joined: Thu Oct 08, 2026 11:43 pm

Re: Snap to cell

Post by bob.the.train »

Correct me if I am wrong but i searched for "snap" and "borders" which did not find this answer, therefore this question had not been asked.
OpenOffice 4.1.16 on Windows 10
User avatar
MrProgrammer
Moderator
Posts: 5480
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

Re: Snap to cell

Post by MrProgrammer »

bob.the.train wrote: Thu Oct 08, 2026 11:47 pm I'm trying to insert an image in Calc and I'd like it to snap to the cell limits. Is there any way of doing this?
In 17 years all of the posts which I've seen about storing images in spreadsheet cells have come to the same conclusion: It is not possible to do that reliably in OpenOffice Calc. Calc cells can contain numbers, text, and error values, but not images. So the answer to your Can I do this? question is: No.

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. You must click the hyperlink in the cell to see the image in your browser (the same application that's displaying this topic). If you need assistance with storing an image in a database, search the Base forum. I'm sure there are plenty of topics about that.

In theory you can use Insert → Picture → From file and anchor an image to a cell. However:
• The image is not in the cell, it is on top of the cell.
• The size of the picture is determined by the image that was inserted, not by the cell size.
• The image is supposed to move when the cell moves, but many people have reported problems with that.
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.7.8, iMac Intel.   The locale for any menus or Calc formulas in my posts is English (USA).
bob.the.train
Posts: 3
Joined: Thu Oct 08, 2026 11:43 pm

Re: Snap to cell

Post by bob.the.train »

That makes a lot of sense, thank you. We might well make a database and see the images with a decent size instead of the approximate sixe of 4 cells merged. Cheers.
OpenOffice 4.1.16 on Windows 10
Bidouille
Volunteer
Posts: 713
Joined: Mon Nov 19, 2007 10:58 am
Location: France

Re: Snap inserted image to cell size

Post by Bidouille »

A workaround is to set a picture into a cell's comment.
See this extension: viewtopic.php?t=103079
User avatar
Jurassic Pork
Posts: 35
Joined: Wed Oct 25, 2017 7:55 am
Location: France

Re: Snap inserted image to cell size

Post by Jurassic Pork »

Hello,
Apache OpenOffice Calc: I cannot confirm that a built-in feature equivalent to “Fit to Cell Size” exists. You can insert an image and anchor it to a cell, but precise resizing may require manual adjustment or a macro.

Recent versions of LibreOffice Calc: Right-click the image and select Fit to Cell Size. Then choose Anchor → To Cell (resize with cell), if available, so that the image resizes when the cell dimensions change. Example in LibreOffice 26.2 :
Robinet2.gif
Robinet2.gif (99.5 KiB) Viewed 901 times
Friendly, J.P
OpenOffice 4.1.14 , LibreOffice 26.2.6.3 on Windows 11/ LibreOffice 7.3.7 on Lubuntu 22.04
Locked