# Write Cell Value

Writes a value into a specified spreadsheet cell or a range.

{% hint style="info" %}
This activity can only be used after the [Open Excel File activity.](https://docs.visualyze.ai/rpa-studio/microsoft-office/excel/open-excel-file)
{% endhint %}

### Input

* **Input** : [`ExcelHandle Variable`](https://docs.visualyze.ai/getting-started/rpa-studio/variables#excelhandle) ![](https://1935494318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M927xRZSEM57y2sBcm3%2Fuploads%2Fgit-blob-20e90e25afa096ee0833e242a7763776d12b4591%2Fimage.png?alt=media)\
  A variable name that references the opened excel file handle.
* **Sheet Name** : [`String Argument`](https://docs.visualyze.ai/getting-started/rpa-studio/arguments#string)![](https://1935494318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M927xRZSEM57y2sBcm3%2Fuploads%2Fgit-blob-20e90e25afa096ee0833e242a7763776d12b4591%2Fimage.png?alt=media)\
  The name of the sheet in which the cell data is to be written.
* **Cell** : [`String Argument`](https://docs.visualyze.ai/getting-started/rpa-studio/arguments#types-of-arguments)![](https://1935494318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M927xRZSEM57y2sBcm3%2Fuploads%2Fgit-blob-20e90e25afa096ee0833e242a7763776d12b4591%2Fimage.png?alt=media)\
  The cell name to be written.

{% hint style="info" %}
The cell is specified in `A1` format .`A1`will select first cell from first row.
{% endhint %}

* **Cell Content** : [`Object Argument`](https://docs.visualyze.ai/getting-started/rpa-studio/arguments#types-of-arguments)![](https://1935494318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M927xRZSEM57y2sBcm3%2Fuploads%2Fgit-blob-20e90e25afa096ee0833e242a7763776d12b4591%2Fimage.png?alt=media)\
  The cell content to be written to the specified cell.
* **Number Format** :

  * The number format of the range in which the data to be written
    * Auto - set number format of the cell as the exact format of the given input.
    * Number - set number format of the cell as the number in which data to be inserted.
    * Date - set number format of the cell as the date in which data to be inserted.
    * Text - set number format of the cell as the text in which data to be inserted.
    * Formula - set number format of the cell as a formula in which data is to be inserted.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.visualyze.ai/rpa-studio/microsoft-office/excel/cell/write-cell-value.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
