Class SettablePivotGlobalizationSettings
Contents
[
Hide
]SettablePivotGlobalizationSettings class
Implementation of PivotGlobalizationSettings that supports user to set/change pre-defined texts.
public class SettablePivotGlobalizationSettings : PivotGlobalizationSettings
Constructors
| Name | Description |
|---|---|
| SettablePivotGlobalizationSettings() | The default constructor. |
Methods
| Name | Description |
|---|---|
| virtual GetNameOfDataField(ConsolidationFunction, string) | Gets the display name of data pivot field. The default format is “Sum Of Field”.(Inherited from PivotGlobalizationSettings.) |
| virtual GetShortTextOf12Months() | Gets all short formatted string of 12 months.(Inherited from PivotGlobalizationSettings.) |
| virtual GetTextOf4Quaters() | Gets the local text of 4 Quaters.(Inherited from PivotGlobalizationSettings.) |
| override GetTextOfAll() | Gets the text of “(All)” label in the PivotTable. |
| virtual GetTextOfAllPeriods() | Gets the localized text of “All Periods”.(Inherited from PivotGlobalizationSettings.) |
| override GetTextOfColumnLabels() | Gets the text of “Column Labels” label in the PivotTable. |
| override GetTextOfDataFieldHeader() | Gets the the text of the value area field header in the PivotTable. |
| virtual GetTextOfDays() | Gets the local text of “Days”.(Inherited from PivotGlobalizationSettings.) |
| override GetTextOfEmptyData() | Gets the text of “(blank)” label in the PivotTable. |
| override GetTextOfGrandTotal() | Gets the text of “Grand Total” label in the PivotTable. |
| virtual GetTextOfHours() | Gets the local text of “Hours”.(Inherited from PivotGlobalizationSettings.) |
| virtual GetTextOfMinutes() | Gets the local text of “Minutes”.(Inherited from PivotGlobalizationSettings.) |
| virtual GetTextOfMonths() | Gets the local text of “Months”.(Inherited from PivotGlobalizationSettings.) |
| override GetTextOfMultipleItems() | Gets the text of “(Multiple Items)” label in the PivotTable. |
| override GetTextOfProtectedName(string) | Gets the text for specified protected name. |
| virtual GetTextOfProtection() | (Obsolete.) Gets the protection name in the PivotTable.(Inherited from PivotGlobalizationSettings.) |
| virtual GetTextOfQuarters() | Get the local text of “Quarters”.(Inherited from PivotGlobalizationSettings.) |
| virtual GetTextOfRange() | Gets the local text of “Range”(Inherited from PivotGlobalizationSettings.) |
| override GetTextOfRowLabels() | Gets the text of “Row Labels” label in the PivotTable. |
| virtual GetTextOfSeconds() | Gets the local text of “Seconds”(Inherited from PivotGlobalizationSettings.) |
| override GetTextOfSubTotal(PivotFieldSubtotalType) | Gets the text of PivotFieldSubtotalType type in the PivotTable. |
| override GetTextOfTotal() | Gets the text of “Total” label in the PivotTable. You need to override this method when the PivotTable contains two or more PivotFields in the data area. |
| virtual GetTextOfYears() | Gets the local text of “Years”.(Inherited from PivotGlobalizationSettings.) |
| SetTextOfAll(string) | Sets the text of “(All)” label in the PivotTable. |
| SetTextOfColumnLabels(string) | Gets the text of “Column Labels” label in the PivotTable. |
| SetTextOfDataFieldHeader(string) | Sets the the text of the value area field header in the PivotTable. |
| SetTextOfEmptyData(string) | Sets the text of “(blank)” label in the PivotTable. |
| SetTextOfGrandTotal(string) | Sets the text of “Grand Total” label in the PivotTable. |
| SetTextOfMultipleItems(string) | Sets the text of “(Multiple Items)” label in the PivotTable. |
| SetTextOfProtectedName(string, string) | Sets the text for specific protected name. |
| SetTextOfRowLabels(string) | Sets the text of “Row Labels” label in the PivotTable. |
| SetTextOfSubTotal(PivotFieldSubtotalType, string) | Sets the text of PivotFieldSubtotalType type in the PivotTable. |
| SetTextOfTotal(string) | Sets the text of “Total” label in the PivotTable. |
Examples
namespace AsposeCellsExamples
{
using Aspose.Cells;
using System;
public class CellsClassSettablePivotGlobalizationSettingsDemo
{
public static void Run()
{
// Create a new workbook for demonstration
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets[0];
try
{
// Create an instance of the SettablePivotGlobalizationSettings class
SettablePivotGlobalizationSettings settings = new SettablePivotGlobalizationSettings();
// Set custom texts for various PivotTable elements
settings.SetTextOfTotal("Total Amount");
settings.SetTextOfGrandTotal("Grand Total Amount");
settings.SetTextOfMultipleItems("Multiple Items Selected");
settings.SetTextOfAll("All Items");
settings.SetTextOfColumnLabels("Column Headers");
settings.SetTextOfRowLabels("Row Headers");
settings.SetTextOfEmptyData("No Data");
settings.SetTextOfDataFieldHeader("Data Values");
// Demonstrate getting the set values
Console.WriteLine($"Total text: {settings.GetTextOfTotal()}");
Console.WriteLine($"Grand Total text: {settings.GetTextOfGrandTotal()}");
Console.WriteLine($"Multiple Items text: {settings.GetTextOfMultipleItems()}");
Console.WriteLine($"All text: {settings.GetTextOfAll()}");
Console.WriteLine($"Column Labels text: {settings.GetTextOfColumnLabels()}");
Console.WriteLine($"Row Labels text: {settings.GetTextOfRowLabels()}");
Console.WriteLine($"Empty Data text: {settings.GetTextOfEmptyData()}");
Console.WriteLine($"Data Field Header text: {settings.GetTextOfDataFieldHeader()}");
// Save the workbook to demonstrate successful execution
workbook.Save("SettablePivotGlobalizationSettingsDemo.xlsx");
Console.WriteLine("SettablePivotGlobalizationSettings instance created and configured successfully");
}
catch (Exception ex)
{
Console.WriteLine($"Error working with SettablePivotGlobalizationSettings: {ex.Message}");
}
}
}
}
See Also
- class PivotGlobalizationSettings
- namespace Aspose.Cells
- assembly Aspose.Cells