# Ods

class
**Ods** extends BaseWriter (View source)

## Properties

protected bool | $includeCharts | Write charts that are defined in the workbook? Identifies whether the Writer should write definitions for any charts that exist in the PhpSpreadsheet object;. | from BaseWriter |

protected bool | $preCalculateFormulas | Pre-calculate formulas Forces PhpSpreadsheet to recalculate all formulae in a workbook when saving, so that the pre-calculated values are immediately available to MS Excel or other office spreadsheet viewer when opening the file. | from BaseWriter |

## Methods

Write charts in workbook? If this is true, then the Writer will write definitions for any charts that exist in the PhpSpreadsheet object.

Set write charts in workbook Set to true, to advise the Writer to include any charts that exist in the PhpSpreadsheet object.

Get Pre-Calculate Formulas flag If this is true (the default), then the writer will recalculate all formulae in a workbook when saving, so that the pre-calculated values are immediately available to MS Excel or other office spreadsheet viewer when opening the file If false, then formulae are not calculated on save. This is faster for saving in PhpSpreadsheet, but slower when opening the resulting file in MS Excel, because Excel has to recalculate the formulae itself.

Set Pre-Calculate Formulas Set to true (the default) to advise the Writer to calculate all formulae on save Set to false to prevent precalculation of formulae on save.

Set use disk caching where possible?

Get writer part.

Save PhpSpreadsheet to file.

Get Spreadsheet object.

## Details

###
in BaseWriter at line 45
```
bool
```**getIncludeCharts**()

**getIncludeCharts**()

Write charts in workbook? If this is true, then the Writer will write definitions for any charts that exist in the PhpSpreadsheet object.

If false (the default) it will ignore any charts defined in the PhpSpreadsheet object.

###
in BaseWriter at line 59
```
IWriter
```**setIncludeCharts**(bool $pValue)

**setIncludeCharts**(bool $pValue)

Set write charts in workbook Set to true, to advise the Writer to include any charts that exist in the PhpSpreadsheet object.

Set to false (the default) to ignore charts.

###
in BaseWriter at line 76
```
bool
```**getPreCalculateFormulas**()

**getPreCalculateFormulas**()

Get Pre-Calculate Formulas flag If this is true (the default), then the writer will recalculate all formulae in a workbook when saving, so that the pre-calculated values are immediately available to MS Excel or other office spreadsheet viewer when opening the file If false, then formulae are not calculated on save. This is faster for saving in PhpSpreadsheet, but slower when opening the resulting file in MS Excel, because Excel has to recalculate the formulae itself.

###
in BaseWriter at line 90
```
IWriter
```**setPreCalculateFormulas**(bool $pValue)

**setPreCalculateFormulas**(bool $pValue)

Set Pre-Calculate Formulas Set to true (the default) to advise the Writer to calculate all formulae on save Set to false to prevent precalculation of formulae on save.

###
in BaseWriter at line 102
```
bool
```**getUseDiskCaching**()

**getUseDiskCaching**()

Get use disk caching where possible?

###
in BaseWriter at line 117
```
IWriter
```**setUseDiskCaching**(bool $pValue, string $pDirectory = null)

**setUseDiskCaching**(bool $pValue, string $pDirectory = null)

Set use disk caching where possible?

###
in BaseWriter at line 137
```
string
```**getDiskCachingDirectory**()

**getDiskCachingDirectory**()

Get disk caching directory.

###
at line 38
```
```**__construct**(Spreadsheet $spreadsheet)

**__construct**(Spreadsheet $spreadsheet)

Create a new Ods.

###
at line 64
```
null|WriterPart
```**getWriterPart**(string $pPartName)

**getWriterPart**(string $pPartName)

Get writer part.

###
at line 80
```
```**save**(string $pFilename)

**save**(string $pFilename)

Save PhpSpreadsheet to file.

###
at line 156
```
Spreadsheet
```**getSpreadsheet**()

**getSpreadsheet**()

Get Spreadsheet object.

###
at line 172
```
Ods
```**setSpreadsheet**(Spreadsheet $spreadsheet)

**setSpreadsheet**(Spreadsheet $spreadsheet)

Set Spreadsheet object.