I found an option for Excel online. You can download a working example of an Excel file. The principle is as follows: inserted a photo into the cell of the Excel table, created a macro, assigned macros to the pictures - everything works.
But "it"is"not working in OpenOffice I mean. You need to do this as in the example of OpenOffice 4.1.2. The main requirement: that, as in the example, the opening picture is located in the center.