TCellValue

Can you determine whether the cell contains a formula or not

How to know if a cell contains a formula or not.

Hi,

You can use TCellValue.IsFormula. You can see an example here: 
http://www.tmssoftware.biz/flexcel/doc/vcl/samples/delphi/api/reading-files/index.html



  if v.IsFormula then
  begin
    Fmla := v.AsFormula;
    ShowMessage('Cell ' + TCellAddress.Create(Row, Col).CellRef + ' contains the Formula: ' + Fmla.Text + #10 +
                'The result of the formula is ' + FormatValue(Fmla.FormulaResult, Row, Col));
    exit;
  end;



ty