Hola, muy buenas. estoy muy atascado con una macro, miro en internet y nada. Necesito insertar una imagen en una celda especifica de una hoja de calc. Alguien me podria ayudar? Alguna referencia?
Muchas gracias
Insertar imagen en celda CALC
Re: Insertar imagen en celda CALC
Código: Seleccionar todo
Dim oSize as New com.sun.star.awt.Size
oDoc = ThisComponent
oSize.width = 1000
oSize.height = 1000
Sheet = oDoc.Sheets.getByIndex(0)
s = "com.sun.star.drawing.GraphicObjectShape"
oShape = oDoc.createInstance(s)
FileName = "C:\Documents and Settings\username\Desktop\New Folder\Imagen.TIF"
FileURL = convertToURL(FileName)
Cell = Sheet.getCellByPosition(6,12) 'Celda G13
oShape.setSize(oSize)
oShape.GraphicURL = FileURL
Drawpage = Sheet.DrawPage
Drawpage.add(oShape)
oShape.setPropertyValue("Anchor", Cell)Re: Insertar imagen en celda CALC
Muchas gracias. Ahora lo pruebo.