PivotTable.EnableWriteback Property

Gets or sets whether writing back to the data source is enabled for the specified PivotTable.

Namespace:  Microsoft.Office.Interop.Excel
Assembly:  Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)

Syntax

'Declaration
Property EnableWriteback As Boolean
    Get
    Set
'Usage
Dim instance As PivotTable
Dim value As Boolean

value = instance.EnableWriteback

instance.EnableWriteback = value
bool EnableWriteback { get; set; }

Property Value

Type: System.Boolean
true if writing back to the data source is enabled for the specified PivotTable; otherwise, false. The default value is false.

Remarks

Read/write.

For OLAP data sources, setting to the EnableWriteback property to true to enables writeback and disables the alert for when the user overwrites values in the data area of the PivotTable. For non-OLAP data sources, setting the EnableWriteback property to true enables write-back in code, and also allows the user to change data values that previously could not be changed.

The EnableWriteback and EnableDataValueEditing properties of the PivotTable object cannot be set to true at the same time.

If the EnableDataValueEditing property is set to true and then the EnableWriteback property is set to true, the EnableDataValueEditing property is set to false automatically, the PivotTable is refreshed, and any editing performed on data values is lost.

If the EnableWriteback property is set to true and then the EnableDataValueEditing property is set to true, the EnableWritebackproperty is set to false automatically, the PivotTable is not refreshed, and the data source values are restored.

For non-OLAP data sources, setting this property generates a run-time error.

See Also

Reference

PivotTable Interface

PivotTable Members

Microsoft.Office.Interop.Excel Namespace