I met the same situation too,Dose NPOI have this function?I just saw addPicture,But I need to Add Object.
the tranditional way is :
the tranditional way is :
public void AddObj(string objPath, float incrementLeft, float incrementTop, float height)
{
try
{
OLEObjects objs = (OLEObjects)workSheet.OLEObjects(Type.Missing);
OLEObject obj = objs.Add(Type.Missing, objPath, false, false, false, Type.Missing, Type.Missing, incrementLeft, incrementTop, 21, height);
obj.ShapeRange.Height = height;
}
catch (Exception e)
{
this.KillExcelProcess();
throw e;
}
}
How should I implement it by NPOI?