I've got a list of this object:
public class SerialMatrix
{
public string SerialNumber { get; set; }
public Image DataMatrix { get; set; }
}
Is there a way to populate a word/excel file with that list?
The problem is that to insert a Image using DocX you need to give the url of the Image and we have the bitmap Image in the object list
I already tried to save each image into a specific path and then read it every time but there's a problem trying to overwrite each image and saving it to the same doc.
foreach (var item in serialNumbers)
{
dataImage = GenerateMatrix(item); //here I generate the datamatrix
objeto.SerialNumber = item; //add the serialnumber to the object
objeto.DataMatrix = dataImage; //add the image(bitmap) to the object
objectlist.Add(objeto); //add the object to my list of objects
}