Are you considering using other nuget packages?
This is an example, add a reference after installing Microsoft.Office.Interop.Excel.
Then try the following code:
Application application = new Application();
Workbook workbook = application.Workbooks.Open(@"D:\test\excel\3.xlsx");
Worksheet worksheet = (Worksheet)workbook.ActiveSheet;
try
{
string imageNetworkLocation = "https://www.gravatar.com/avatar/c5c9adf8dbcec1537e8e60ed8a6d1f13?s=328&d=identicon&r=PG&f=1";
worksheet.Shapes.AddPicture(imageNetworkLocation, Microsoft.Office.Core.MsoTriState.msoFalse, Microsoft.Office.Core.MsoTriState.msoCTrue, 0, 0, 85, 85);
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
finally
{
workbook.Save();
workbook.Close();
application.Quit();
}
If you must use NPIO for some reasons, please provide a complete piece of code that can reproduce the problem for us to test.
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.