Insert a gif image in a spreadsheet

  • Thread starter Rafael Nenninger
  • Start date
R

Rafael Nenninger

I tried implementing it by converting a regular excel macro:
ActiveSheet.Pictures.Insert("C:\images\header.gif").Select
Selection.ShapeRange.IncrementLeft -424.5
Selection.ShapeRange.IncrementTop -346.5

into asp code:
set objXL = server.createobject("OWC.Spreadsheet")
objXL.ActiveSheet.pictures.Insert(server.MapPath("..")
&"\images\rtlogo.gif") objXL.Selection.shapeRange.IncrementLeft -424.5
objXL.Selection.shapeRange.IncrementTop -346.5

But I got this error message
Object doesn't support this property or method: 'pictures'

Is there a way to insert an image (or an object referencing an image)?

Thanks,

Rafael
 
A

Alvin Bruney [MVP]

the closest you can come is to insert a hyperlink pointing to the image thru
the address property of the active sheet. excel does not support embedded
objects in the spreadsheet
 
V

v.mazzotta

Excuse me Alvin,
i tested this but if Rafael insert an hyperlink, he can't see th
image in spreadsheet Only if user click on hyperlink will open a ne
internet explorer page within image.
can explains to you, if exists a methods to see image in a spreadshee
range ?

Thanks in advance
 
A

Alvin Bruney - MVP ASP.NET

that functionality is not supported. the spreadsheet only supports embedding
hyperlinks. Nothing else. The hack in the black book allows you to put
objects on top of the spreadsheet, not IN the spreadsheet

--
Regards,
Alvin Bruney

Shameless Author Plug
[The Microsoft Office Web Components Black Book with .NET]
www.lulu.com/owc, Amazon, Barnes & Noble etc
Forth-coming VSTO.NET
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top