# BaseWriter

abstract class
**BaseWriter** implements
IWriter (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;. | |

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

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

Get use disk caching where possible?

Set use disk caching where possible?

Get disk caching directory.

## Details

###
at line 38
```
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 43
```
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 50
```
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 55
```
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 62
```
bool
```**getUseDiskCaching**()

**getUseDiskCaching**()

Get use disk caching where possible?

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

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

Set use disk caching where possible?

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

**getDiskCachingDirectory**()

Get disk caching directory.