天软金融分析.NET函数大全 > 文档处理函数 > Excel处理函数 > Excel操作相关的类 > TxlsSheet类 > TxlsSheet方法

AsFormula    

简述
返回指定带计算的单元格的公式
定义
AsFormula(Col:Integer;Row:Integer): String;
参数
名称类型说明
ColInteger整数,列的位置,从0开始。
RowInteger 整数,行的位置,从0开始。
返回 String 字符串
  • 范例

    obj:=CreateObject("txlsreadwrite");
    filename:="E:\\TestExcel\\TslRW01.xlsx";
    obj.LoadFromFile("",filename);
    mysheet:=obj.sheets("表3");
    return mysheet.AsFormula(3,2);

    返回字符串:B3>C3
    原excel:
相关