Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
Aspose.Cells smart markers support image markers too. This section shows you how to insert pictures using smart markers.
Smart marker parameters for managing images.
string FilePath = @"..\..\..\Sample Files\";
string FileName = FilePath + "Image Markers.xlsx";
//Get the image data.
byte[] imageData = File.ReadAllBytes(FilePath + "Aspose.Cells.png");
//Create a datatable.
DataTable t = new DataTable("Table1");
//Add a column to save pictures.
DataColumn dc = t.Columns.Add("Picture");
//Set its data type.
dc.DataType = typeof(object);
//Add a new new record to it.
DataRow row = t.NewRow();
row[0] = imageData;
t.Rows.Add(row);
//Add another record (having picture) to it.
//imageData = File.ReadAllBytes(FilePath + "Desert.jpg");
//row = t.NewRow();
//row[0] = imageData;
//t.Rows.Add(row);
//Create WorkbookDesigner object.
WorkbookDesigner designer = new WorkbookDesigner();
//Open the temple Excel file.
designer.Workbook = new Workbook(FileName);
//Set the datasource.
designer.SetDataSource(t);
//Process the markers.
designer.Process();
//Save the Excel file.
designer.Workbook.Save(FileName);
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.