Bug 167017 - In-cell pictures
Summary: In-cell pictures
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
24.8.7.2 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:xlsx, needsUXEval
Depends on:
Blocks:
 
Reported: 2025-06-14 16:54 UTC by dough.mean
Modified: 2025-06-19 19:15 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
A sample spreadsheet file containing an in-cell image (75.76 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2025-06-14 16:55 UTC, dough.mean
Details
Screencast (495.90 KB, image/gif)
2025-06-16 06:25 UTC, Heiko Tietze
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dough.mean 2025-06-14 16:54:53 UTC
Description:
Since 2023, Excel 365 has this new feature called "Place in Cell" that allows users to place in-cell pictures into their spreadsheets.

This new feature is different from the older "Place over Cells" that LibreOffice Calc already supports. With this new feature, images can be embedded and contained within the cell, automatically reacting to cell resizing, etc. While the older variant would simply "float" over the cells.

Here is a short clip demonstrating the feature (audio warning): https://www.youtube.com/watch?v=kZ87gcncKZM

And here is the official documentation of the feature: https://support.microsoft.com/en-us/office/insert-picture-in-cell-in-excel-e9317aee-4294-49a3-875c-9dd95845bab0

I've also attached a sample spreadsheet file that demonstrates the feature. When opened in a compliant editor, this will display a picture of a dog in the top-left cell. Otherwise, it will simply display "#VALUE!".

Steps to Reproduce:
1. Download the attached spreadsheet file
2. Open the file in LibreOffice Calc

Actual Results:
A picture of a dog is displayed in cell A1.

Expected Results:
"#VALUE!" is displayed in cell A1.


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 24.8.7.2 (X86_64) / LibreOffice Community
Build ID: 480(Build:2)
CPU threads: 20; OS: Linux 6.12; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 1 dough.mean 2025-06-14 16:55:51 UTC
Created attachment 201277 [details]
A sample spreadsheet file containing an in-cell image
Comment 2 Heiko Tietze 2025-06-16 06:25:20 UTC
The file opens in Calc with #VALUE!, "Place Over Cell" does show the image.

The attribute works like anchoring to a cell plus fit to cell. The "image handle" are actually cell handle and duplicates the cell when dragged. The image size changes with col/row width/height (always keeping the aspect ratio). Formulas like =A1 copy the content image.

We provide different anchoring options with the Insert > Image dialog, or allow to change it later. Could imagine another option here. However, this is not really some anchoring. It kind of turns an image into as cell background and we could offer this as an extra option: 

Image 
  > Make cell background
  > Make cell content

(the first turning the object into a cell background, the second to "place in cell")

Not sure if this requires an addition to ODF.
Comment 3 Heiko Tietze 2025-06-16 06:25:41 UTC
Created attachment 201302 [details]
Screencast
Comment 4 Regina Henschel 2025-06-19 19:15:06 UTC
(In reply to Heiko Tietze from comment #2)
> The file opens in Calc with #VALUE!, "Place Over Cell" does show the image.

The content #VALUE! is for those applications, that are not able to interpret the value metadata.

> 
> The attribute works like anchoring to a cell plus fit to cell. The "image
> handle" are actually cell handle and duplicates the cell when dragged. The
> image size changes with col/row width/height (always keeping the aspect
> ratio). Formulas like =A1 copy the content image.

The image replaces the cell content in Excel, whereas anchoring to cell and applying uno:FitCellSize keeps the content. The concept in Excel belongs to its CUBE-foo functions. The specification of the used "Value Metadata" feature is in chapter 18.9 of the OOXML spec part 1.

I do not consider it as new type of "anchor", what Excel does here.

> Not sure if this requires an addition to ODF.

It might be that it is possible to use the attributes xhtml:about (19.911), xhtml:content (19.912), xhtml:datatype (19.913), xhtml:property (19.914). They are related to RDF (https://www.w3.org/TR/rdf11-concepts/). But I have absolutely no idea about RDF.