PPTX DOCX XLSX PDF ODP
Aspose.Cells  for Java
XLSX

Insert SVG images/Icons into Excel via Java

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 Using Java

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

Aspose.Cells for Java

API which is a feature-rich, powerful and easy to use API for Java platform. You can download its latest version directly from

Maven

and install it within your Maven-based project by adding the following configurations to the pom.xml.

Repository


<repository>
<id>AsposeJavaAPI</id>
<name>Aspose Java API</name>
<url>https://repository.aspose.com/repo/</url>
</repository>

Dependency


<dependency>
<groupId>com.aspose</groupId>
<artifactId>aspose-cells</artifactId>
<version>version of aspose-cells API</version>
<classifier>jdk17</classifier>
</dependency>

Steps to insert SVG images/Icons to Excel file via Java

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

System Requirements

Aspose.Cells for Java supports on all major platforms and Operating Systems. Please make sure that you have the following prerequisites.

  • Microsoft Windows or a compatible OS with Java Runtime Environment for JSP/JSF Application and Desktop Applications.
  • Get latest version of Aspose.Cells for Java directly from Maven.
 

Insert SVG images/Icons - Java

 
  • About Aspose.Cells for Java 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.