> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sequentum.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Open page

> Open HTML or JSON pages from files, commands, Agent parameters, action results, static values, or scripts.

The Open Page command opens a new HTML or JSON page from content supplied by an input source. PDF, Excel, and CSV input is converted to HTML automatically. Located under **Browser** in the command palette.

## HTML or JSON input

The **HTML or JSON input** section defines the source whose content is incorporated into the new page.

![HTML or JSON input settings](https://mintcdn.com/sequentum/dOYM46qwxTPgqNVx/images/agents/commands/open-page/img-06.png?fit=max\&auto=format\&n=dOYM46qwxTPgqNVx\&q=85\&s=5bcf442a8e862f6a13b32345b6a3ba08)

* **HTML:** Selects the source from which content is incorporated into HTML. The available sources are:
  * **Data list:** Iteratively loads content from an input source, such as a file or manually supplied content, into a new HTML page.
  * **Command:** Loads content from a predefined Content command.
  * **Agent parameter:** Loads content directly from an Agent parameter.
  * **Action result:** Parses AJAX responses from the parent URL or Link command and incorporates the content into a new HTML page.
  * **Static value:** Parses manually entered JSON or HTML into a new page.
    * **Encrypt:** Encrypts the HTML or JSON in the form field when selected. It is cleared by default.
  * **Script:** Uses a script to load content under specified conditions and parse it into a new page.

The following C# example reads a file whose name comes from an Agent parameter:

```csharp theme={null}
#r System.IO.dll
using System.IO;

public string GetData(RunContext context)
{
    var fileName = context.GlobalData.GetString("InputFileName");
    var filePath = context.PrivateFiles.GetFile(fileName);
    var inputFile = File.ReadAllText(filePath);
    return inputFile;
}
```

The following Python example reads a file whose name comes from an Agent parameter:

```python theme={null}
from se_scripting_utils import *
import os

def get_data(context: RunContext):
    file_name = context.global_data.get_string("InputFileName")
    file_path = context.private_files.get_file(file_name)
    with open(file_path, 'r') as input_file:
        return input_file.read()
```

### Export

See [Export](https://docs.sequentum.com/agents/commands/properties/export.md) for more information.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.