[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.IPivotTable.DisplayErrorString

DisplayErrorString Property

DisplayErrorString

Gets or sets whether the PivotTable report displays a custom error string in cells that contain errors.

When this property is true, the PivotTable uses the string specified by ErrorString for cells that contain errors. The default value is false.

Declaration
bool DisplayErrorString { get; set; }
Property DisplayErrorString As Boolean
Examples
worksheet.Range["A1:B4"].Value = new object[,] {
    {"Category", "Amount"},
    {"A", 10},
    {"B", 20},
    {"A", 15}
};
IPivotCache pivotCache = workbook.PivotCaches.Create(worksheet.Range["A1:B4"]);
IPivotTable pivotTable = worksheet.PivotTables.Add(pivotCache, worksheet.Range["D1"], "PivotTable1");
pivotTable.DisplayErrorString = true;
bool displayErrorstring = pivotTable.DisplayErrorString;