/// <summary>创建指定区域或当前区域(如果该区域为单个单元格时)的分类汇总。 /// </summary> /// <param name="GroupBy">要作为分组依据的字段,为基于 1 的整数偏移量。有关详细信息,请参阅示例。</param> /// <param name="Function">分类汇总函数。</param> /// <param name="TotalList">基于 1 的字段偏移量数组,它指明将被分类汇总的字段。有关详细信息,请参阅示例。</param> /// <param name="Replace">如果为 True,则替换现有分类汇总。默认值为 True。</param> /// <param name="PageBreaks">如果为 True,则在每一组之后添加分页符。默认值为 False。</param> /// <param name="SummaryBelowData">放置相对于分类汇总的汇总数据。</param> public dynamic Subtotal(int GroupBy, XlConsolidationFunction Function, int TotalList, bool? Replace = null, bool? PageBreaks = null, XlSummaryRow SummaryBelowData = XlSummaryRow.xlSummaryBelow) { _objaParameters = new object[6] { GroupBy, Function, TotalList, Replace == null ? System.Type.Missing : Replace, PageBreaks == null ? System.Type.Missing : PageBreaks, SummaryBelowData }; return _objRange.GetType().InvokeMember("Subtotal", BindingFlags.InvokeMethod, null, _objRange, _objaParameters); }
public object Subtotal(int GroupBy, XlConsolidationFunction Function, object TotalList, object Replace, object PageBreaks, XlSummaryRow SummaryBelowData) { throw new NotImplementedException(); }
/// <summary>将多个工作表中多个区域的数据合并计算至单个工作表上的单个区域。Variant 类型。 /// </summary> /// <param name="Sources">以文本引用字符串数组的形式给出合并计算的源,该数组采用 R1C1-样式表示法。这些引用必须包含将要合并计算的工作表的完整路径。</param> /// <param name="Function">XlConsolidationFunction 常量之一,用于指定合并计算的类型。</param> /// <param name="TopRow">如果为 True,则基于合并计算区域中首行内的列标题对数据进行合并。如果为 False,则按位置进行合并计算。默认值为 False。</param> /// <param name="LeftColumn">如果为 True 则基于合并计算区域中左列内的行标题对数据进行合并计算。如果为 False,则按位置进行合并计算。默认值为 False。</param> /// <param name="CreateLinks">如果为 True,则让合并计算使用工作表链接。如果为 False,则让合并计算复制数据。默认值为 False。</param> public dynamic Consolidate(string Sources = null, XlConsolidationFunction? Function = null, bool? TopRow = null, bool? LeftColumn = null, bool? CreateLinks = null) { _objaParameters = new object[5] { Sources == null ? System.Type.Missing : Sources, Function == null ? System.Type.Missing : Function, TopRow == null ? System.Type.Missing : TopRow, LeftColumn == null ? System.Type.Missing : LeftColumn, CreateLinks == null ? System.Type.Missing : CreateLinks }; return _objRange.GetType().InvokeMember("Consolidate", BindingFlags.InvokeMethod, null, _objRange, _objaParameters); }