【问题标题】:In telerik RadSpreadSheet how can I get cell name from cell index or selection?在 Telerik RadSpreadSheet 中,如何从单元格索引或选择中获取单元格名称?
【发布时间】:2014-06-19 08:15:43
【问题描述】:
private string GetCellName()
{
    var cell = mySpreadsheet.ActiveWorksheetEditor.Selection.ActiveCell;

    // I expect A1 if active cell is cell[0,0]
    return cell. // What should i call here to get cell name;
}

在 WPF 应用程序中使用 Telerik RadSpreadSheet
我正在尝试从 Selection 对象或给定的单元格索引中获取单元格引用(如 Excel 应用程序 A1、B15、...中的单元格名称)
注意:
Telerik understand reference in formulasthere is a class called CellReference

【问题讨论】:

    标签: c# wpf excel telerik spreadsheet


    【解决方案1】:

    NameConverter 类提供帮助方法来在单元格或列索引和名称之间进行转换

    private string GetCellName()
    {
         CellIndex cellIndex = this.radSpreadsheet.ActiveWorksheetEditor.Selection.ActiveCellIndex;
         return NameConverter.ConvertCellIndexToName(cellIndex);
    }
    

    【讨论】:

      猜你喜欢
      • 2013-12-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-10-30
      • 2011-03-11
      • 1970-01-01
      • 2018-02-15
      相关资源
      最近更新 更多