# IWriter

interface
**IWriter** (View source)

## 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.

Save PhpSpreadsheet to file.

Get use disk caching where possible?

Set use disk caching where possible?

Get disk caching directory.

## Details

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

**__construct**(Spreadsheet $spreadsheet)

IWriter constructor.

###
at line 23
```
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.

###
at line 34
```
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.

###
at line 46
```
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.

###
at line 57
```
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.

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

**save**(string $pFilename)

Save PhpSpreadsheet to file.

###
at line 73
```
bool
```**getUseDiskCaching**()

**getUseDiskCaching**()

Get use disk caching where possible?

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

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

Set use disk caching where possible?

###
at line 92
```
string
```**getDiskCachingDirectory**()

**getDiskCachingDirectory**()

Get disk caching directory.