Adding pictures into Excel

Hi, from your Programmer’s Guide:

I can see that you can add pictures by using :
pics.Add(1, 5, “c:\temp.jpg”)…but my concern is that your examples specify picture files stored on the harddrive. But for web development, these pictures would be stored on the server, how does the client get these pictures when they open up the spreadsheet?

When you save Excel files on the server, Aspose.Excel will load pictures from harddrive and write them to the Excel files. So when your clients open the spreadsheet, the picutures are already included.

@Kristy,
Aspose.Cells has replaced Aspose.Excel that is no more available now and is discarded. You can use Aspose.Cells to add picture at a particular row and column, proportional position, absolute position and insert a picture based on cell reference. Here is a simple example that demonstrates adding a picture to an Excel file.

// Instantiating a Workbook object
Workbook workbook = new Workbook();

// Obtaining the reference of the newly added worksheet by passing its sheet index
Worksheet worksheet = workbook.Worksheets[0];

// Adding a picture at the location of a cell whose row and column indices
// Are 2 in the worksheet. It is "C3" cell
worksheet.Pictures.Add(2, 2, "logo.png");

// Saving the Excel file
workbook.Save("AddPictures.xls");

Here is the program output:

You may visit the following article for more information on managing pictures.
Managing Pictures

Here is the free trial version of Aspose.Cells for .NET:
Aspose.Cells for .NET (Latest Version)

Download a complete runnable solution here to test a variety of features of this product.