PivotTable Protection Name

While implementing PivotGlobalizationSettings, there is a method GetTextOfProtection. The documentation says it’s for the “protection name in the PivotTable”. What is the “protection name” of a PivotTable?

Can you please share a screenshot of the protection name displayed in Excel UI or VBA?

Values is the protected name in the PivotTable. When this string appears in the data source of the PivotTable as the name of PivotField, it will be renamed as Values2. Please see the attachment.
result.PNG (42.0 KB)

@John.He Thanks for the clarification.

I think this is what Microsoft calls “the initial name of the DataField” (since Excel 2007). Prior to Excel 2007, “the initial name of the DataField” was “Data”.

It seems that Aspose.Cells still uses “Data” as the default name for the DataField instead of “Values”. That’s why it caused some confusion.

Values is the protected name in the pivot table. When the VALUES area in the PivotTable contains two or more PivotFields, the PivotTable will generate a virtual DataField. Values is the name of the DataField by default. Please check the attachment.
values.PNG (49.0 KB)

@John.He Yes, that was exactly what I was saying. Because the default name for the virtual DataField is Values (translated as in Microsoft GlobalStrings), the name is reserved (what Aspose calls “protection name”).


It seems @John.He has clarified your queries/doubts. Should you have further queries, feel free to write us back.

Thanks @amjad.sahi

You are welcome!