【发布时间】:2016-12-21 01:19:58
【问题描述】:
我正在将一个比糖蜜还慢的 Ross-Ice-Shelf Excel 互操作应用程序移植到 Aspose Cells。我正在尝试移植的一项功能(找不到方法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?
【问题讨论】:
标签: excel pivot-table aspose aspose-cells