Assuming that you have the picture in a BLOB field you have to export it to a location on your hard drive. Afterwards, after creating an instance of Excel through automation and assigning a variable to the Excel Automation server of class Sheet which is assigned as the ActiveSheet add this line of code:
After the path and filename, the 1 links the image to the file, the next 1 will set SaveWithDocument to TRUE, the next 2 integers are for position (in points) and the final 2 integers are for size (in points). Hope this helps.
Comments
Assuming that you have the picture in a BLOB field you have to export it to a location on your hard drive. Afterwards, after creating an instance of Excel through automation and assigning a variable to the Excel Automation server of class Sheet which is assigned as the ActiveSheet add this line of code:
xlSheet.Shapes.AddPicture(FilePathAndName, 1, 1, 20, 20, 100, 100);
After the path and filename, the 1 links the image to the file, the next 1 will set SaveWithDocument to TRUE, the next 2 integers are for position (in points) and the final 2 integers are for size (in points). Hope this helps.