web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Manipulate images in Excel through EPPlus

(2) ShareShare
ReportReport
Posted on by 16
I need one of the following two functions.
 
1) Delete spesfic image in excel sheet.
 
using OfficeOpenXml;
using OfficeOpenXml.ExcelWorksheet;
using OfficeOpenXml.Style;
using OfficeOpenXml.Table;
using OfficeOpenXml.ExcelRange;
using OfficeOpenXml.ExcelRangeBase;
using System.Drawing;
using System.Drawing.Image;
using OfficeOpenXml.Drawing;
using OfficeOpenXml.Drawing.ExcelPicture;
using OfficeOpenXml.Drawing.ExcelDrawing;
using OfficeOpenXml.ExcelPackage;
using OfficeOpenXml.ExcelWorkbook;
using OfficeOpenXml.ExcelWorksheet;
 
~~~~~
 
using (var  package = new OfficeOpenXml.ExcelPackage(memoryStream))
        {
            var worksheet = package.get_Workbook().get_Worksheets().get_item(1); // 첫 번째 시트 선택
            var cells = worksheet.get_Cells();
 
~~~~
 
// find image "Picture1" that delete image.
 
 
 
2) Get Image in URL and insert Excel sheet
 
 
I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    301,231 Super User 2025 Season 2 on at
    Hi,
     
    Can you explain what EPPLUS is? Can you tell us the functional requirement and the relation with Dynamics 365 Finance? 
    What URL and/or images are you referring to?
     
    If you can provide more information, we might be able to understand your requirements and then try to help you.
  • 동김-13080324-0 Profile Picture
    16 on at
    Hi. andre.
     
    EPPlus is a highly popular spreadsheet/xlsx library for .NET Framework/.NET Core.
     
    We even made it to show the data of ERP to EXCEL using EPPLUS's fuctions.
     
    We have technical issues in the following two.
     
    1) Depending on the conditions, we must remove the images contained in the worksheet of the Excel template.
    2) Depending on the conditions, the C.E.O sign image in the container field of the table should be shown in Excel.
     
        
  • Suggested answer
    Martin Dráb Profile Picture
    237,994 Most Valuable Professional on at
    Your code worksheet.Drawings.ExcelDrawings("Pic001", image1) is indeed invalid. If you look at ExcelDrawings class, you'll see that it doesn't have any ExcelDrawings() method. You should use AddPicture() instead. For example:
    ExcelDrawings drawings = worksheet.Drawings;
    drawings.AddPicture("Pic001", image1);
    Notice that there are several overloads of AddPicture(); you could use the data stream directly.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Abhilash Warrier Profile Picture

Abhilash Warrier 669 Super User 2025 Season 2

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 449 Super User 2025 Season 2

#3
Martin Dráb Profile Picture

Martin Dráb 384 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans