ID EN
#Dynamic array

IMAGE

Excel Functions 🇮🇩 Bahasa Indonesia

Ambil gambar ke Excel dari Internet

Syntax

EXCEL
=IMAGE(source, [alt_text], [sizing], [height], [width])

Arguments

Parameter Deskripsi
source Path to image as a URL.
alt_text [optional] Text to describe the image for accessibility.
sizing [optional] 0 = Fit to cell, 1 = Fill cell, 2 = Original size, 3 = Custom size.
height [optional] Height of the image in pixels.
width [optional] Width of the image in pixels.

Return Value

Gambar pada jalur yang diberikan

Details

Fungsi IMAGE adalah solusi Excel untuk menambahkan gambar ke lembar kerja dengan rumus. IMAGE dalam beberapa hal mirip dengan tag HTML, yang digunakan untuk menambahkan gambar ke halaman HTML. Seperti tag, fungsi IMAGE memungkinkan Anda mengatur jalur gambar dan memberikan opsi untuk kesesuaian dan ukuran. IMAGE mendukung banyak format file, termasuk BMP, JPG, JPEG, GIF, TIFF, PNG, ICO, dan WEBP. Gambar harus tersedia online dan dapat dijangkau dengan protokol "https://". Selama jalurnya valid dan dapat diakses, IMAGE akan mengambil gambar dan membawa salinannya ke dalam sel di lembar kerja. Anda dapat menggunakan fungsi IMAGE untuk menambahkan gambar ke hal-hal seperti daftar karyawan, informasi produk, permainan, dan data lain yang menyertakan gambar. Tentu saja, Anda bisa menyisipkan gambar secara manual ke dalam sel kapan saja, jadi mengapa menggunakan IMAGE

Contoh

Simple Example

In its simplest form, the IMAGE function requires just the path to an image:

EXCEL
=IMAGE(source)
Simple Example

For example, to retrieve an image of the Norwegian flag (which exists on this website as the file "flag_norway.png", you can use the IMAGE function li

EXCEL
=IMAGE("https://exceljet.net/sites/default/files/flag_norway.png")
Example - Source path only

IMAGE returns an image directly to a cell. In the worksheet below, you can see an example of using the IMAGE function to return six different country

EXCEL
=IMAGE(C5)
Example - Formula to generate source path

Because IMAGE accepts a path to an image as plain text, this text can be created programmatically with another formula. This is useful when the path t

EXCEL
flag_canada.png
flag_united_states.png
flag_germany.png
flag_united_kingdom.png
flag_mexico.png
flag_france.png
Example - Formula to generate source path

In addition, the path always begins with the same text:

EXCEL
"https://exceljet.net/sites/default/files/"
Example - Formula to generate source path

Because we already have the country names in column B, and because the flag images are consistently named, we have what we need to assemble each image

EXCEL
=SUBSTITUTE("https://exceljet.net/sites/default/files/flag_xxxx.png",
"xxxx",SUBSTITUTE(LOWER(B5)," ","_"))