<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "TabularData",
  "identifier" : "/documentation/TabularData/CSVWritingOptions/init(includesHeader:nilEncoding:trueEncoding:falseEncoding:newline:delimiter:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "TabularData"
    ],
    "preciseIdentifier" : "s:11TabularData17CSVWritingOptionsV14includesHeader11nilEncoding04trueH005falseH07newline9delimiterACSb_S4SSJtcfc"
  },
  "title" : "init(includesHeader:nilEncoding:trueEncoding:falseEncoding:newline:delimiter:)"
}
-->

# init(includesHeader:nilEncoding:trueEncoding:falseEncoding:newline:delimiter:)

Creates a set of options for writing a CSV file.

```
init(includesHeader: Bool = true, nilEncoding: String = "", trueEncoding: String = "true", falseEncoding: String = "false", newline: String = "\n", delimiter: Character = ",")
```

## Parameters

`includesHeader`

A Boolean value that indicates whether to write a header with the column names. Defaults to
`true`.

`nilEncoding`

The spelling for nil values. Defaults to an empty string.

`trueEncoding`

The spelling for true Boolean values. Defaults to `true`.

`falseEncoding`

The spelling for false Boolean values. Defaults to `false`.

`newline`

The newline sequence. Defaults to a line feed.

`delimiter`

The field delimiter. Defaults to comma (`,`).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)