我正在向Aspose Cells移植比Ross-Ice-Shelf Excel Interop应用程序更慢的糖蜜。我试图移植的一个功能(无法找到方法here)是“FreezePanes”
我的遗产(Excel Interop)代码被注释掉了;有用;我对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...
}
有没有办法在Aspose Cells中设置FreezePanes?