In Excel, converting the link of the picture website into the actual picture can facilitate us to process various data, visualize the content of the picture, and make the information of the form more intuitive and rich. In particular, Xlsx worksheets involving product lists, picture displays or data analysis can not only help everyone to quickly identify and avoid the ambiguity of simple words, but also obtain information related to pictures while viewing data by turning URL links into real pictures. Here, three practical methods are introduced in detail for small partners who do not know how to convert picture URL links into pictures in Excel forms. Only a few simple steps are needed to complete the operation of converting picture URL links into pictures in Excel, which saves time and effort, is simple and intuitive. Let's give it a try with me!
Under what circumstances do I need to convert a picture URL link in an Excel cell into a picture?
- Directly converting the picture links in Excel into real pictures can make the content more intuitive when making product lists and quotations, facilitate customers to quickly understand the appearance characteristics of products and improve communication efficiency.
- In the process of analyzing data, tables with pictures have stronger expression power. For example, when classifying different kinds of goods, turning links into pictures can more intuitively show the style of each category.
- After making the report or chart, Excel inserts many links of table pictures in advance. We can quickly convert these URL links into pictures to avoid the reduction of work efficiency caused by manual complicated pasting. It not only saves time but also ensures the consistency and aesthetics of table contents.
Preview of the effect of converting picture URL links into pictures in batch in Excel
before treatment:
after treatment:
method 1: Use HeSoft Doc Batch Tool Batch convert Excel picture URL links to pictures
recommend index:★★★★★
Advantages:
- it supports batch operation of multiple Excel tables, and can select multiple custom settings of processing range, picture filling method and height and width.
- The added files are processed locally, there is no problem of uploading files, and the privacy of users is protected.
Disadvantages:
- only software can be installed in the computer.
Operate steps:
1. Open 【 HeSoft Doc Batch Tool ], select [Excel Tools]-[Convert Picture Address in Excel to Picture]].
2. Select a way to add files in [Add Files] or [Import Files from Folders] to add Excel tables that need to convert URL links, or drag the files directly below. Click Next when you are sure there are no problems with the imported Xlsx workbook.
3. Various options can be customized in the setting interface:
[Processing Range] You can select all cells with URL image links, or just convert a column of cells.
[Picture Save Location] The picture can be overlaid on the cell containing the URL, or the URL link can be reserved to insert the picture on the left or right.
[Picture Filling Method] Floating Fill can move pictures anywhere in the Excel table. Embed Fill can only fix the picture in the cell operation.
Click Next again after selecting. Then click Browse to select the location to save the Excel file after processing.
4. After waiting for the processing to end, click the red path of the save location to open the file to view the converted Excel file.
Method 2: Use the VBA macro function to batch turn links in Excel tables into pictures
recommend index:★★★☆ ☆
advantages:
- compatible with all versions after Excel 2010, processing speed is also faster.
- Ability to customize the layout and parameters of the conversion picture.
Disadvantages:
- using the macro feature can be a security risk and requires macro security to be enabled.
- A network error may interrupt processing.
Operate steps:
1. After opening the Excel form to be processed, press Alt F11 to open the VBA editor.
2. Insert the new module and enter the code below. Then press F5 to run the macro.
Method 3: Use Python script to convert links in Xlsx table to images
recommend index:★★★☆ ☆
advantages:
- suitable for large-scale data processing.
- You can scale or watermark images linked by conversion.
Disadvantages:
- need programming foundation, the cost of learning is large.
- To be done under Python environment configuration.
Operate steps:
install the Python library.
pip install openpyxl requests pillow
2. Create the following script excel_Img.py.
import openpyxl
from io import BytesIO
import requests
from PIL import Image
wb = openpyxl.load_workbook("input.xlsx")
ws = wb.active
for row in range(2, ws.max_row 1):
url = ws.cell(row=row, column=2).value # The URL is in column B
if url.startswith("http"):
response = requests.get(url)
img = Image.open(BytesIO(response.content))
img.save(f"temp_img_{row}.png")
img_obj = openpyxl.drawing.image.Image(f"temp_img_{row}.png")
img_obj.width, img_obj.height = 100, 100 # UNIFORM
ws.add_image(img_obj, f"C{row}") # Insert image into column C
wb.save("output.xlsx")