# Write Workbook

> Perform Write Workbook through GenHealth.

Source: [https://genhealth.ai/docs/workflows/integrations/gen-health/genhealth_write_workbook](https://genhealth.ai/docs/workflows/integrations/gen-health/genhealth_write_workbook)

Integration: [GenHealth](https://genhealth.ai/docs/workflows/integrations/gen-health.md)

- Handler: `genhealth_write_workbook`

## Inputs

- `rows` — Rows (expression, required)
  Required literal value or workflow expression.
- `sheet_name` — Sheet Name (text)
  Optional text value.
  Default: `"Sheet1"`
- `extra_sheets` — Extra Sheets (expression)
  Optional literal value or workflow expression.
- `columns` — Columns (expression)
  Optional literal value or workflow expression.
- `header_labels` — Header Labels (expression)
  Optional literal value or workflow expression.
- `filename` — Filename (text)
  Optional text value.
  Default: `"workbook.xlsx"`

## Outputs

- `success` — Success
- `document_id` — Document Id
- `filename` — Filename
- `row_count` — Row Count
- `sheet_names` — Sheet Names
- `error` — Error

Output schema completeness: `best_effort_declared`

## Safety

- External effect: `write`
- Confirmation recommended: no
- Retry safe: no
- Dry run supported: no

## Schemas

These schemas are first-pass authoring guidance. Runtime validation remains authoritative.

### Input schema

```json
{
  "type": "object",
  "required": [
    "rows"
  ],
  "properties": {
    "rows": {
      "description": "Required literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "columns": {
      "description": "Optional literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "filename": {
      "type": "string",
      "default": "workbook.xlsx",
      "description": "Optional text value.",
      "x-workflow-field-type": "text"
    },
    "sheet_name": {
      "type": "string",
      "default": "Sheet1",
      "description": "Optional text value.",
      "x-workflow-field-type": "text"
    },
    "extra_sheets": {
      "description": "Optional literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "header_labels": {
      "description": "Optional literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    }
  },
  "additionalProperties": false
}
```

### Output schema

```json
{
  "type": "object",
  "properties": {
    "error": {},
    "success": {},
    "filename": {},
    "row_count": {},
    "document_id": {},
    "sheet_names": {}
  },
  "additionalProperties": true
}
```
