public IXLPivotValue Add(String sourceName, String customName) { var pivotValue = new XLPivotValue(sourceName) { CustomName = customName }; _pivotValues.Add(sourceName, pivotValue); return(pivotValue); }
public IXLPivotValue Add(String sourceName, String customName) { var pivotValue = new XLPivotValue(sourceName) { CustomName = customName }; _pivotValues.Add(customName, pivotValue); if (_pivotValues.Count > 1 && !this._pivotTable.ColumnLabels.Any(cl => cl.SourceName == XLConstants.PivotTableValuesSentinalLabel) && !this._pivotTable.RowLabels.Any(rl => rl.SourceName == XLConstants.PivotTableValuesSentinalLabel)) { _pivotTable.ColumnLabels.Add(XLConstants.PivotTableValuesSentinalLabel); } return(pivotValue); }
public IXLPivotValue Add(String sourceName, String customName) { if (sourceName != XLConstants.PivotTable.ValuesSentinalLabel && !this._pivotTable.SourceRangeFieldsAvailable.Contains(sourceName)) { throw new ArgumentOutOfRangeException(nameof(sourceName), String.Format("The column '{0}' does not appear in the source range.", sourceName)); } var pivotValue = new XLPivotValue(sourceName) { CustomName = customName }; _pivotValues.Add(customName, pivotValue); if (_pivotValues.Count > 1 && this._pivotTable.ColumnLabels.All(cl => cl.SourceName != XLConstants.PivotTable.ValuesSentinalLabel) && this._pivotTable.RowLabels.All(rl => rl.SourceName != XLConstants.PivotTable.ValuesSentinalLabel)) { _pivotTable.ColumnLabels.Add(XLConstants.PivotTable.ValuesSentinalLabel); } return(pivotValue); }
public IXLPivotValue Add(String sourceName, String customName) { var pivotValue = new XLPivotValue(sourceName) { CustomName = customName }; _pivotValues.Add(sourceName, pivotValue); return pivotValue; }
public XLPivotValueFormat(XLPivotValue pivotValue) { _pivotValue = pivotValue; _format = "General"; _numberFormatId = 0; }
public XLPivotValueFormat(XLPivotValue pivotValue) { _pivotValue = pivotValue; _format = "General"; _numberFormatId = 0; }