Skip to content

Class ExcelTableCopyEventArgs

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

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

public class ExcelTableCopyEventArgs

Inheritance

object ← ExcelTableCopyEventArgs

Inherited Members

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

Constructors

ExcelTableCopyEventArgs()

public ExcelTableCopyEventArgs()

Properties

DefaultName

The name that was assigned to the copied table by default, before this handler runs. When the worksheet is copied within the same workbook, this is a generated name (Table1, Table2, ...). When copied to another workbook, the original name is kept when it is still available, in which case this equals SourceTableName; if a 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 table. Leave as null to keep DefaultName. Setting this to an existing table name will cause the same validation exception as a normal table name assignment.

public string NewName { get; set; }

Property Value

string

SourceTableName

The name of the table on the source worksheet.

public string SourceTableName { get; }

Property Value

string