简体   繁体   English

有没有一种方法可以冻结Aspose单元中的FreezePanes(在数据透视表上)?

[英]Is there a way to FreezePanes (on a Pivot Table) in Aspose Cells?

I'm porting a slower-than-molasses-on-the-Ross-Ice-Shelf Excel Interop app to Aspose Cells. 我正在将比罗斯-冰架上的糖蜜慢的Excel Interop应用程序移植到Aspose Cells。 One feature I'm trying to port over (can't find the way to do it here ) is "FreezePanes" 我要移植的一个功能( 在这里找不到方法)是“ FreezePanes”

My legacy (Excel Interop) code is commented out; 我的旧版(Excel Interop)代码已被注释掉; it works; 有用; my attempt at an Aspose Cellsisization of it is below that - all I could get was setting the range: 我对其进行Aspose Cellsisization的尝试低于该尝试-我只能设置范围:

private void FreezePanePivotTable(int rowToFreeze, int colToFreeze)
{
    //Range pivotTableCellToFreeze = (Range)_xlPivotTableSheet.Cells[rowToFreeze, colToFreeze];
    //_xlPivotTableSheet.Activate();
    //pivotTableCellToFreeze.Activate();
    //pivotTableCellToFreeze.Application.ActiveWindow.FreezePanes = true;

    // AsposeCells version of the above:
    var pivot = pivotTableSheet.PivotTables[0];
    var dataBodyRange = pivot.DataBodyRange;
    int rowsUsed = dataBodyRange.EndRow;
    int colsUsed = dataBodyRange.EndColumn;

    Range pivotTableCellToFreeze = pivotTableSheet.Cells.CreateRange(
        rowToFreeze, colToFreeze, rowsUsed, colsUsed);
    //pivotTableSheet.ac <= No "activate"
    //pivotTableCellToFreeze.act <= No "activate" here, either
    //pivotTableCellToFreeze.ApplyStyle <= No "Application.etc." etither...
}

Is there a way to set up FreezePanes in Aspose Cells? 有没有办法在Aspose Cells中设置FreezePanes?

Please follow this thread and let us know if it resolves your issue and if you are looking for something else. 请关注此主题,让我们知道它是否可以解决您的问题以及您是否在寻找其他东西。

Thread Link 线程链接

Note: I am working as Developer Evangelist at Aspose 注意:我在Aspose担任开发人员布道者

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM