Gets or sets custom data associated with the current cell.
A System.Object that contains information closely associated with the cell.
The Tag property is used to attach a temporary object to a worksheet cell. You can assign any type derived from the System.Object class to this property. The property value is cached depending on a cell reference, and the cache is automatically re-calculated if a cell is moved, copied, or removed.
Take into account the following restrictions when you use the Tag property:
The CellRange.CopyFrom method clears cell tags in the target range when all content (PasteSpecial.All) or cell formatting is copied (PasteSpecial.Formats). To avoid this, you can store tag values in a variable (e.g., a List), and then restore them after executing the CopyFrom method.