SettablePivotGlobalizationSettings.GetTextOfMultipleItems
SettablePivotGlobalizationSettings.GetTextOfMultipleItems method
Gets the text of “(Multiple Items)” label in the PivotTable.
public override string GetTextOfMultipleItems()
Return Value
The text of “(Multiple Items)” label
Examples
namespace AsposeCellsExamples
{
using Aspose.Cells;
using System;
public class SettablePivotGlobalizationSettingsMethodGetTextOfMultipleItemsDemo
{
public static void Run()
{
// Create a new workbook
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets[0];
// Add some sample data for context
worksheet.Cells["A1"].PutValue("Category");
worksheet.Cells["B1"].PutValue("Value");
worksheet.Cells["A2"].PutValue("A");
worksheet.Cells["B2"].PutValue(10);
worksheet.Cells["A3"].PutValue("B");
worksheet.Cells["B3"].PutValue(20);
// Create an instance of SettablePivotGlobalizationSettings
SettablePivotGlobalizationSettings settings = new SettablePivotGlobalizationSettings();
try
{
// Get the default text for multiple items
string multipleItemsText = settings.GetTextOfMultipleItems();
Console.WriteLine($"Default text for multiple items: {multipleItemsText}");
// Set a custom text for multiple items
settings.SetTextOfMultipleItems("(Multiple Items Custom)");
multipleItemsText = settings.GetTextOfMultipleItems();
Console.WriteLine($"Updated text for multiple items: {multipleItemsText}");
// Save the workbook
workbook.Save("GetTextOfMultipleItemsDemo.xlsx");
Console.WriteLine("GetTextOfMultipleItems method called successfully");
}
catch (Exception ex)
{
Console.WriteLine($"Error calling GetTextOfMultipleItems: {ex.Message}");
}
}
}
}
See Also
- class SettablePivotGlobalizationSettings
- namespace Aspose.Cells
- assembly Aspose.Cells