This project has moved. For the latest updates, please go here.

Image with delete row

Jun 27, 2011 at 7:37 AM
Edited Jun 27, 2011 at 7:43 AM

Hello,

I'm sorry for my english.

In french at end.

I created an Excel file and I put pictures on some cells with the statement :

    Dim F as FileInfo = New FileInfo(NomImage)

     Dim Pic As OfficeOpenXml.Drawing.ExcelPicture = ws.Drawings.AddPicture("Legende" +      Ligne.ToString + "_"+ Colonne.ToString, f)

         Pic.From.Column = Colonne - 1

      Pic.From.Row = Ligne - 1

      Pic.SetSize(100)

In Excel 2007, when I delete rows with images, images of the deleted row are placed on the line below.

It's a bug ?

Bests regards,

Fabrice.

---------------------

In french

J'ai créé un fichier Excel et je place des images sur certains cellules avec l'instruction :

    Dim F as FileInfo = New FileInfo(NomImage)

     Dim Pic As OfficeOpenXml.Drawing.ExcelPicture = ws.Drawings.AddPicture("Legende" + Ligne.ToString + "_"+ Colonne.ToString, f)

         Pic.From.Column = Colonne - 1

      Pic.From.Row = Ligne - 1

      Pic.SetSize(100)

 Dans Excel 2007, lorsque je supprime les lignes avec images, les images se placent sur la ligne dessous.

Est-ce normal ?

Cordialement,

Fabrice

 

Editor
Jun 27, 2011 at 12:57 PM

I think it is an expect behavior from excel, you´ve added a picture to a coordinate, not inside row/column.

Jun 27, 2011 at 3:09 PM

Hello,

If i use this code

    Pic.SetPosition(100, 100)

I have the same problem.

 

They are others méthod ?

 

 

Best regard.

Fabrice

 

Coordinator
Jun 30, 2011 at 6:53 PM

The InsertRow and DeleteRow only shift cells and update formulas in this version.

Pictures, Drawings, charts, comments, tabels and pivottables  are not effected by the InsertRow or DeleteRow methods.