UiPath Documentation
activities
latest
false
Important :
Veuillez noter que ce contenu a été localisé en partie à l’aide de la traduction automatique. La localisation du contenu nouvellement publié peut prendre 1 à 2 semaines avant d’être disponible.

Activités de productivité

Insert an image into a Google Sheets cell

Summary: Display an image inside a Google Sheets cell using the Google Sheets IMAGE formula and the Write Cell activity.

Applications: Google Sheets

Description: This example explains how to use the Write Cell activity to write the Google Sheets IMAGE formula into a cell, which displays a publicly accessible image directly inside the cell.

Remarque :

The Google Sheets API does not support inserting images directly into cells. This tutorial shows a workaround using the IMAGE formula, which references a publicly accessible image URL and renders it inside the cell.

Workflow

  1. Ouvrez Studio Web et créez un nouveau projet.
  2. Add a Write Cell activity to your workflow.
  3. In the activity, configure the following:
    • Configurez votre connexion Google Sheets.
    • In the Spreadsheet field, browse and select the target spreadsheet.
    • In the Sheet/Named range field, select the sheet where you want to insert the image, for example, Sheet1.
    • In the Cell field, enter the target cell, for example, A1.
    • In the What to write field, enter the IMAGE formula with the publicly accessible URL of your image: =IMAGE("https://example.com/your-image.png").
  4. To control how the image fits the cell, add a mode parameter to the formula. The following modes are available:
    • =IMAGE("url", 1) — Resizes the image to fit inside the cell while maintaining the original aspect ratio. This is the default behavior.
    • =IMAGE("url", 2) — Stretches or compresses the image to fill the cell, ignoring the aspect ratio.
    • =IMAGE("url", 3) — Displays the image at its original size. The image may be cropped if it is larger than the cell.
    • =IMAGE("url", 4, height, width) — Displays the image at a custom size. Replace height and width with your desired pixel values, for example: =IMAGE("url", 4, 100, 200).
  5. Vous avez terminé et prêt à exécuter votre projet !

Limitations

Keep the following limitations in mind when you use this approach:

  • The image URL must be publicly accessible over HTTPS. Images behind authentication or access restrictions are not supported.
  • Google Drive images must be publicly shared (set to Anyone with the link can view) for the IMAGE formula to display them. Private Google Drive file links do not work.
  • The IMAGE formula adds a dynamic reference to the image URL, not a static embedded object. The displayed image updates if the content at the source URL changes.
  • Workflow
  • Limitations

Cette page vous a-t-elle été utile ?

Connecter

Besoin d'aide ? Assistance

Vous souhaitez apprendre ? UiPath Academy

Vous avez des questions ? UiPath Forum

Rester à jour