# sheetToCsv

Source: /xlsx-format/api-reference/functions/sheettocsv

Convert a worksheet to a CSV string.

Supports customizable field and record separators, hidden row/column
skipping, blank-row suppression, raw number output, and forced quoting.

```ts
sheetToCsv(sheet: WorkSheet, opts?: Sheet2CSVOpts): string
```

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| ` sheet ` | [` WorkSheet `](</xlsx-format/api-reference/interfaces/worksheet/>) | Yes | The worksheet to convert |
| ` opts ` | [` Sheet2CSVOpts `](</xlsx-format/api-reference/interfaces/sheet2csvopts/>) | No | Optional CSV generation options (FS, RS, skipHidden, strip, blankrows, rawNumbers, forceQuotes) |

## Returns

` string `

The CSV string representation of the worksheet
