I'm using ClosedXML to create an sheet for excel and inserting data in it.
My code for this -
FileStream fs = new FileStream("C:\\Images\\jcilogo.png", FileMode.Open);
byte[] buffer = new byte[fs.Length];
fs.Read(buffer, 0, buffer.Length);
MemoryStream image = new MemoryStream(buffer);
fs.Close();
XLPicture pic = new XLPicture
{
NoChangeAspect = true,
NoMove = true,
NoResize = true,
ImageStream = image,
Name = "stamp"
};
XLMarker fMark1 = new XLMarker
{
ColumnId = 1,
RowId = 1
};
XLMarker fMark2 = new XLMarker
{
ColumnId = 6,
RowId = 6,
};
pic.AddMarker(fMark1);
pic.AddMarker(fMark2);
worksheet.AddPicture(pic);
worksheet.Cell("G25").Value = "ジョンソンコントロールズ株式会社";
worksheet.Cell("H26").Value = "ンコントロー";
worksheet.Cell("L26").Value = "ズ株式会";
worksheet.Cell("H27").Value = "+99 998 77 65";
worksheet.Cell("M28").Value = "ロールズ株式";
worksheet.Cell("H28").Value = "ソンコントロールズ株";
This code is creating is creating an excel successfully but the image which i have used is coming above the text. like this -
But i want image to come under the text under the text which is present in teh cell or to have transparent background.
Is it possible to make it transparent or to put it behind the text?