Descarguen el archivo adjunto, asignen la siguiente macro al evento "Contenido cambiado", establezcan la ruta absoluta donde están las imágenes, usen el formato URL y listo.
Código: Seleccionar todo
PATH = 'file:///home/mau/Documents/img/{}.jpg'
def actualizar_imagen(source):
if source.ImplementationName != 'ScCellObj':
return
cols = 0
rows = 2
sheet = source.Spreadsheet
dp = sheet.DrawPage
ca = source.CellAddress
cell = sheet.getCellByPosition(ca.Column + cols, ca.Row + rows)
img = False
for i in dp:
if cell.AbsoluteName == i.Anchor.AbsoluteName:
img = i
break
if img:
img.GraphicURL = PATH.format(cell.String)
img.Visible = False
img.Visible = True
return