<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Saludos. <br>He intentado hacer formulas de excel desde lazarus pero ha sido en vano. Hasta ahora el codigo que he usado es:<br><br><pre dir="ltr" class="mw-geshi mw-content-ltr"><pre class="de1"> <span class="co1">// =Sum(E2:e5)</span>
MyWorksheet<span class="sy1">.</span><span class="me1">WriteUTF8Text</span><span class="br0">(</span><span class="nu0">1</span><span class="sy1">,</span> <span class="nu0">0</span><span class="sy1">,</span> <span class="st0">'=Sum(E2:e5)'</span><span class="br0">)</span><span class="sy1">;</span> <span class="co1">// A2</span>
<span class="co1">//</span>
<span class="kw3">SetLength</span><span class="br0">(</span>MyRPNFormula<span class="sy1">,</span> <span class="nu0">2</span><span class="br0">)</span><span class="sy1">;</span>
MyRPNFormula<span class="br0">[</span><span class="nu0">0</span><span class="br0">]</span><span class="sy1">.</span><span class="me1">ElementKind</span> <span class="sy1">:</span><span class="sy3">=</span> fekCellRange<span class="sy1">;</span>
MyRPNFormula<span class="br0">[</span><span class="nu0">0</span><span class="br0">]</span><span class="sy1">.</span><span class="me1">Row</span> <span class="sy1">:</span><span class="sy3">=</span> <span class="nu0">1</span><span class="sy1">;</span>
MyRPNFormula<span class="br0">[</span><span class="nu0">0</span><span class="br0">]</span><span class="sy1">.</span><span class="me1">Row2</span> <span class="sy1">:</span><span class="sy3">=</span> <span class="nu0">4</span><span class="sy1">;</span>
MyRPNFormula<span class="br0">[</span><span class="nu0">0</span><span class="br0">]</span><span class="sy1">.</span><span class="me1">Col</span> <span class="sy1">:</span><span class="sy3">=</span> <span class="nu0">4</span><span class="sy1">;</span>
MyRPNFormula<span class="br0">[</span><span class="nu0">0</span><span class="br0">]</span><span class="sy1">.</span><span class="me1">Col2</span> <span class="sy1">:</span><span class="sy3">=</span> <span class="nu0">4</span><span class="sy1">;</span>
MyRPNFormula<span class="br0">[</span><span class="nu0">1</span><span class="br0">]</span><span class="sy1">.</span><span class="me1">ElementKind</span> <span class="sy1">:</span><span class="sy3">=</span> fekOpSUM<span class="sy1">;</span>
MyWorksheet<span class="sy1">.</span><span class="me1">WriteRPNFormula</span><span class="br0">(</span><span class="nu0">1</span><span class="sy1">,</span> <span class="nu0">2</span><span class="sy1">,</span> MyRPNFormula<span class="br0">)</span><span class="sy1">;</span> <span class="co1">// C2<br><br></span></pre></pre>de la pagina: http://wiki.lazarus.freepascal.org/FPSpreadsheet#Using_ranges_of_cells_and_the_unary_SUM_operator<br><br>al compilar aparece un error que dice algo como que "fekCellRange" es identificador no idetificado; es decir ese seņor no aparece por ningun lado.<br><br>La formula que intento hacer es una suma, muchas gracias por la ayuda que me puedan dar.<br><br> </div></body>
</html>