Skip to content

Class ExcelPivotTableCopyEventArgs

Namespace: OfficeOpenXml.Core.Worksheet
Assembly: EPPlus.dll

Provides context for a pivot table that is being copied to a new worksheet, and allows a custom name to be assigned to the copied pivot table.

public class ExcelPivotTableCopyEventArgs

Inheritance

object ← ExcelPivotTableCopyEventArgs

Inherited Members

object.Equals(object?, object?)
object.Equals(object?)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object?, object?)
object.ToString()

Constructors

ExcelPivotTableCopyEventArgs()

public ExcelPivotTableCopyEventArgs()

Properties

DefaultName

The name that was assigned to the copied pivot table by default, before this handler runs. When the worksheet is copied within the same workbook, this is a generated name (PivotTable1, PivotTable2, ...). When copied to another workbook, the original name is kept when it is still available, in which case this equals SourceTableName; if a pivot table with that name already exists in the target workbook, a generated name is used instead.

public string DefaultName { get; }

Property Value

string

NewName

The name to assign to the copied pivot table. Leave as null to keep DefaultName. Setting this to an existing pivot table name will cause the same validation exception as a normal pivot table name assignment.

public string NewName { get; set; }

Property Value

string

SourceTableName

The name of the pivot table on the source worksheet.

public string SourceTableName { get; }

Property Value

string