<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hola, no se si un TStringGrid tiene la opción, pero todos los
componentes derivados de TStrings tienen para pasar y recoger los
items a una cadena string separada por un delimitador. Además tiene
un loadfromfile y savefromfile .... combinando estos métodos tiene
que ser muy sencillo.<br>
<br>
(sacado de la documentación online de free pascal)<br>
<span class="code"><span class="kw">type</span> TStrings <span
class="sym">=</span> <span class="kw">class</span><span
class="sym">(</span><a
href="http://www.freepascal.org/docs-html/rtl/classes/tpersistent.html">TPersistent</a><span
class="sym">)</span></span><br>
<span class="code"> <span class="kw">procedure </span><a
href="http://www.freepascal.org/docs-html/rtl/classes/tstrings.loadfromfile.html">LoadFromFile</a><span
class="sym">();</span><span class="kw"> virtual</span><span
class="sym">; // </span></span>Insert a string and
associated object in the list.<br>
<span class="code"> <span class="kw">procedure </span><a
href="http://www.freepascal.org/docs-html/rtl/classes/tstrings.savetofile.html">SaveToFile</a><span
class="sym">();</span><span class="kw"> virtual</span><span
class="sym"> // </span></span>Move a string from
one place in the list to another.
<br>
<span class="code"> <span class="kw">property </span><a
href="http://www.freepascal.org/docs-html/rtl/classes/tstrings.delimiter.html">Delimiter</a><span
class="sym">: </span>Char<span class="sym">;</span>
[rw] </span><span class="code">// </span>Delimiter
character used in <a
href="http://www.freepascal.org/docs-html/rtl/classes/tstrings.delimitedtext.html">DelimitedText</a>.
<br>
<span class="code"> <span class="kw">property </span><a
href="http://www.freepascal.org/docs-html/rtl/classes/tstrings.delimitedtext.html">DelimitedText</a><span
class="sym">: </span>String<span class="sym">;</span>
[rw] </span>// Get or set all strings in the list in a
delimited form.
<br>
<span class="code"> <span class="kw">property </span><a
href="http://www.freepascal.org/docs-html/rtl/classes/tstrings.strictdelimiter.html">StrictDelimiter</a><span
class="sym">: </span>Boolean<span class="sym">;</span>
[rw] // </span>Should only the delimiter character be
considered a delimiter<br>
<span class="code"> <span class="kw">property </span><a
href="http://www.freepascal.org/docs-html/rtl/classes/tstrings.quotechar.html">QuoteChar</a><span
class="sym">: </span>Char<span class="sym">;</span>
[rw] // </span>Quote character used in <a
href="http://www.freepascal.org/docs-html/rtl/classes/tstrings.delimitedtext.html">DelimitedText</a>
.<br>
<span class="code"> <span class="kw">property </span><a
href="http://www.freepascal.org/docs-html/rtl/classes/tstrings.commatext.html">CommaText</a><span
class="sym">: </span>String<span class="sym">;</span>
[rw] // </span>Capacity of the list, i.e. number of
strings that the list can currently hold before it tries to expand.
<br>
<br>
Espero te sirva, un saludo.<br>
<br>
<br>
El 29/07/11 18:24, Gustavo Cruz Martínez escribió:
<blockquote cite="mid:BLU0-SMTP17324E0F1F59D2C5455F795AE370@phx.gbl"
type="cite">Buenas tardes amigos,
<br>
<br>
Me gustaría saber cuál es la forma de cargar, en tiempo de
ejecución, un archivo delimitado por como.
<br>
<br>
Gracias de Antemano por vuestro tiempo
<br>
<br>
<br>
Gustavo Cruz
<br>
<br>
_______________________________________________
<br>
Lazarus-es mailing list
<br>
<a class="moz-txt-link-abbreviated" href="mailto:Lazarus-es@lists.lazarus.freepascal.org">Lazarus-es@lists.lazarus.freepascal.org</a>
<br>
<a class="moz-txt-link-freetext" href="http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus-es">http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus-es</a>
<br>
</blockquote>
</body>
</html>