> For the complete documentation index, see [llms.txt](https://help.metaforms.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.metaforms.ai/survey-programming-decipher/unified-flow/dat-file.md).

# Generating a DAT file in Unified Flow

In Unified Flow, generate a `.dat` file for a **MaxDiff** or **Conjoint** study by asking the AI Assistant in project chat.

## Before you start

Make sure that:

* You are working in a Forsta Decipher project and have permission to edit it.
* The project contains the design workbook. Supported formats are `.xlsx`, `.xls`, and `.xlsm`.
* You know which worksheet contains the design matrix that should be converted.
* You know whether the design is **MaxDiff** or **Conjoint**.

If the workbook is not in the project, upload it from the **Files** panel before starting generation.

## Generate through the AI Assistant

**Step 1:** Open the project, go to the **Build** page, and open the **AI Assistant** chat. Ask the assistant to generate the file. For example:

> Generate a DAT file from the design workbook in this project.

<figure><img src="/files/JCHELLsuXjB5xRhyJIl1" alt="AI Assistant with a request to generate a DAT file"><figcaption></figcaption></figure>

**Step 2:** The assistant checks the available Excel workbooks and worksheets. If there is more than one suitable option, select the workbook and worksheet that contain the design matrix. Then:

* Choose **MaxDiff** for a best-worst scaling design or **Conjoint** for an attribute trade-off design.
* Enter the output `.dat` file name using letters, numbers, hyphens, or underscores. The assistant adds the `.dat` extension if you omit it.

<figure><img src="/files/YwK0zSshpwSdaa76Ctln" alt="DAT generation type and output file name selected in the AI Assistant"><figcaption></figcaption></figure>

**Step 3:** Review the confirmation summary. Check the workbook, worksheet, generation type, and output file name, select **Yes**, and submit the response to start generation.

<figure><img src="/files/E4PjtVG7UTjUAkHPUBWD" alt="Confirmation summary before DAT file generation"><figcaption></figcaption></figure>

**Step 4:** When generation finishes, review the generated rows and columns. Make any necessary edits, then select **Save to Project**.

<figure><img src="/files/dOrNuqLfanmURQvVrBIY" alt="Generated DAT file review dialog with Save to Project action"><figcaption></figcaption></figure>

**Step 5:** Open the **Files** panel and the new `.dat` file appears under **DAT Files**.

<figure><img src="/files/zxmXs0TUs01XuQxE97pI" alt="Generated DAT file in the project Files panel"><figcaption></figcaption></figure>

## Troubleshooting

* **Open or edit an existing DAT file:** Go to the **Files** panel, select the `.dat` file, make the required changes, and save it.
* **The assistant cannot start generation:** Confirm that the project uses Forsta Decipher.
* **No workbook is available:** Upload an `.xlsx`, `.xls`, or `.xlsm` file from the **Files** panel, then ask the assistant again.
* **The expected worksheet is missing:** Open the source workbook and confirm that the design matrix is stored in a named worksheet and that the workbook is not corrupted.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://help.metaforms.ai/survey-programming-decipher/unified-flow/dat-file.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
