Insert SVG images/Icons into Excel using Python 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 Python via .Net
In order to insert SVG images/Icons into excel file, we’ll use
Aspose.Cells for Python via .Net
API which is a feature-rich, powerful and easy to use document manipulation API for Python via .Net platform.The API provides Excel file creation, manipulation, conversion and rendering. All without relying on Microsoft Office or Excel applications.You can install from the console using the following command.
Command
> pip install aspose-cells-python
Steps to insert SVG images/Icons to Excel file using Python via .Net
You need the Aspose.Cells 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 shapecollection’s add method to insert a icon in the selected worksheet.
- Save workbook in XLSX format.
System Requirements
Aspose.Cells for Python via .Net is platform-independent API and can be used on any platform (Windows, Linux), just make sure that system have Python 3.7 or higher.
- Any operating system that can run Python via .Net scripts, such as Windows, Linux
- Install Aspose.Cells for Python via .Net from pypi, use command as:
$ pip install aspose-cells-python
.