Insert an image into a excel document RRS feed

  • Question

  • Hello,

    I am looking for a solution from something that seems really easy, but I can't manage to mage it working (I know VB.NET, but no C#).

    I would like to create a simple excel document with a png image in it. I can't manage to make it.
    I have been able to add the png into the excel (xlsx)  and it is in the document. (There is a png in the excel file when renamed into Zip and the png is correct.)

    I have tried to convert the code from the reflector into VB.NET, and there is no error (opening the document created), but no image.
    I have tried a simple document with the reflector and directly pasted the document in a C# project (not change in the code) and there is an error while opening the document in excel.

    Can you please tell me where I can find information on how to insert a picture in a document?

    Thank you
    Thursday, April 30, 2009 12:39 PM

All replies

  • could you tell me what's the error?
    Thursday, May 7, 2009 4:50 AM
  • Hello,

    Thank you for your answer. Here is my error message.
    In the startup, Excel says that there was a problem in the content of the file, so I choose to repair the file and the error there is the following one.

    "Excel was able to open the file by deleting or repairing the damaged content"
    Removed part : /xl/drawings/drawing.xml part (drawing).

    It is a message in French. The original message French was
    Partie supprimée: /xl/drawings/drawing.xml partie.  (Forme de dessin)

    Thursday, May 7, 2009 7:02 AM