PNG JPG BMP TIFF XLSX
Aspose.Cells  for .NET

Insert SVG images/Icons into Excel via .NET

Insert SVG images/Icons using Aspose.Cells’ API without any software like Microsoft or Open Office, Adobe PDF, etc.

You don’t want to see images stretched and compressed on any device?

You don’t want the image to be blurry when zoomed in?

You don’t want the image to be distorted at high resolution?

Maybe SVG is a good choice.SVG images look great at any zoom level, and they’re resolution-independent.Due to the high fidelity of svg images, it is very popular among Excel users.

When you use Excel, you may encounter the following problems:

  • The target Excel file cannot be manually manipulated directly, and a program is required to process it.
  • Insert a large number of svg images into the same Excel file.
  • Insert svg images into a large number of different Excel files.

To solve these problems, we recommend you to use the Aspose.Cells library.It contains many common interfaces for processing excel files and is a very useful tool.

How to Insert SVG images/Icons into Excel File Using Microsoft Excel

Microsoft Excel provides us with three ways to insert svg:

  • Insert local SVG images/Icons

You can simply drag and drop the SVG file to a specific location in the document. Or you can choose the “Insert -> Picture -> This Device…” path from the ribbon.

  • Insert preset SVG images/Icons

Microsoft Excel has provided us with preset svg pictures for us to choose. You can open the selection dialog by selecting the “Insert -> Picture -> Stock Images…” path from the ribbon. Most of the svg files are under the “Icons” option in Stock Images.

  • Insert SVG images/Icons from the web

If none of the above methods can meet your needs, you can also search for the results you want from the Internet through Microsoft Excel.You can open the selection dialog by selecting the “Insert -> Picture -> Online Pictures…” path from the ribbon.

How to Insert SVG images/Icons into Excel File Using C#

In order to insert SVG images/Icons into excel file, we’ll use

Aspose.Cells for .NET

API which is a feature-rich, powerful and easy to use document manipulation and splitter API for C# platform. Open

NuGet

package manager, search for Aspose.Cells and install. You may also use the following command from the Package Manager Console.

Command


PM> Install-Package Aspose.Cells

Steps to insert SVG images/Icons to Excel file via C#

You need the aspose.cells.dll to try the following workflow in your own environment.

  • Instantiating a Workbook object.(or->Load the XLSX file with full path.)
  • Select Worksheet via its index.
  • Use the add method to insert a icon in the selected worksheet
  • Save workbook in XLSX format.

System Requirements

Aspose.Cells for .NET is supported on all major operating systems. Just make sure that you have the following prerequisites.

  • Microsoft Windows or a compatible OS with .NET Framework, .NET Core, Mono or Xamarin Platforms
  • Development environment like Microsoft Visual Studio
  • Add reference to the Aspose.Cells for .NET DLL in your project - Install from NuGet using the Download button above
 

Insert SVG images/Icons - C#

 
  • About Aspose.Cells for .NET API

    Aspose.Cells API can be used to create, edit, convert and render Microsoft Excel formats to different formats. Moreover, it can be used for comprehensive charting, scalable reporting and reliable calculations within software applications. Aspose.Cells is a standalone API and it does not require any software like Microsoft or OpenOffice.