Managing Pictures

Adding Pictures

Adding pictures to a spreadsheet is very easy. It only takes a few lines of code.

Simply call the add method of the Pictures collection (encapsulated in the Worksheet object). The add method takes the following parameters:

  • Upper left row index, the index of the upper left row.
  • Upper left column index, the index of the upper left column.
  • Image file name, the name of the image file, complete with path.

Positioning of Pictures

Pictures can be positioned using Aspose.Cells as follows:

Absolute Positioning

Developers can position the pictures absolutely by using the setUpperDeltaX and setUpperDeltaY methods of the Picture object.