<div dir="ltr"><div>Thanks for all suggestions. IMO fpspread...pas is too complex for & I'd need to hack thro' thousands of lines - maybe a simple program to read xls into csv, as in b) below could be added?.</div>
<div><br></div><div>Here, fyi, In looking around I came up with these 2 : </div><div><br></div><div>a) googled 'read xls' </div><div><br></div><a href="http://exceldatareader.codeplex.com/" target="_blank">http://exceldatareader.codeplex.com/</a><br>
<div><br>
</div><div>Unfortunately I don't use c# but the mechanisms for reading spread look simple in the referenced page ie 1 line! </div><div><br></div><div>Guess one could try to use the excel.dll in te reference in fpc & then access it from fpc</div>
<div><br></div><div>b) using a <10 line vbs program referenced here to create a csv file then getting the data from that </div><div><br></div><div><a href="http://stackoverflow.com/questions/1858195/convert-xls-to-csv-on-command-line">http://stackoverflow.com/questions/1858195/convert-xls-to-csv-on-command-line</a><br>
</div><div><br></div><div>This is the way I'm doing it, running the vbs file from cmd using exec etc, simple if crude!. </div><div><br></div><div>john</div><div><br></div><div><br></div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On 1 October 2013 12:15, John Lee <span dir="ltr"><<a href="mailto:johnelee0@gmail.com" target="_blank">johnelee0@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Thanks - as you say (with nice irony) it isn't a simple format, and I don't pretend to understand it, indeed it is 'doing my head in' - but I don't want to write .xls or do charts etc, just read some cells (only in in excel 2003, seems to be v11 according to help) - maybe my hope of a few lines, with one or two units 'used', isn't possible but there seem to be millions of lines here. Is there an example of reading cells from named spread that you could point to? <span class="HOEnZb"><font color="#888888"><div>
<br></div><div>John</div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On 1 October 2013 08:44, Felipe Monteiro de Carvalho <span dir="ltr"><<a href="mailto:felipemonteiro.carvalho@gmail.com" target="_blank">felipemonteiro.carvalho@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The source code of fpspreadsheet is open ... just copy/paste/modifiy<br>
it for your needs:<br>
<br>
<a href="https://sourceforge.net/p/lazarus-ccr/svn/HEAD/tree/components/fpspreadsheet/xlsbiff8.pas#l50" target="_blank">https://sourceforge.net/p/lazarus-ccr/svn/HEAD/tree/components/fpspreadsheet/xlsbiff8.pas#l50</a><br>
<br>
But BIFF8 is not a simple format, there is no simple answer to your<br>
question. It is encapsulated in a OLE Document storage system to start<br>
with, which is something pretty complex.<br>
<br>
BIFF2 till BIFF5 (Excel 5.0) were simple formats, but that's not the<br>
format you are looking for from your question.<br>
<span><font color="#888888"><br>
Felipe<br>
</font></span><div><div><br>
On Mon, Sep 30, 2013 at 9:45 PM, John Lee <<a href="mailto:johnelee0@gmail.com" target="_blank">johnelee0@gmail.com</a>> wrote:<br>
> Thanks - that looks excellent, but the 'uses' list for this, for non lazarus<br>
> users, has, I guess, lots of things in it.<br>
><br>
> The problem is also that I'm trying to implement this hack in an old version<br>
> of pascal, v2.2.2 for which I only have the compiler & basic rtl stuff -<br>
> that's why I'd just like some info for a quick hack eg some bullets or some<br>
> idea what I need to do eg to read the no or string in eg cell x23 of sheet<br>
> jim in fred.xls.<br>
><br>
> John<br>
><br>
><br>
><br>
><br>
><br>
><br>
> On 30 September 2013 16:38, Felipe Monteiro de Carvalho<br>
> <<a href="mailto:felipemonteiro.carvalho@gmail.com" target="_blank">felipemonteiro.carvalho@gmail.com</a>> wrote:<br>
>><br>
>> You mean like this library does? <a href="http://wiki.freepascal.org/FPSpreadsheet" target="_blank">http://wiki.freepascal.org/FPSpreadsheet</a><br>
>><br>
>> Felipe Monteiro de Carvalho<br>
>><br>
>> On Mon, Sep 30, 2013 at 5:33 PM, John Lee <<a href="mailto:johnelee0@gmail.com" target="_blank">johnelee0@gmail.com</a>> wrote:<br>
>> > File produced by excel 2003. Can anyone tell me the basic ideas,<br>
>> > formats,<br>
>> > pitfalls - I'd just like to write a short routine & don't want to fight<br>
>> > with<br>
>> > the complexities of the lazarus based stuff. Prepared to experiment...<br>
>> ><br>
>> > TIA John<br>
>> ><br>
>> ><br>
>> ><br>
>> > _______________________________________________<br>
>> > fpc-pascal maillist - <a href="mailto:fpc-pascal@lists.freepascal.org" target="_blank">fpc-pascal@lists.freepascal.org</a><br>
>> > <a href="http://lists.freepascal.org/mailman/listinfo/fpc-pascal" target="_blank">http://lists.freepascal.org/mailman/listinfo/fpc-pascal</a><br>
>><br>
>><br>
>><br>
>> --<br>
>> Felipe Monteiro de Carvalho<br>
>> _______________________________________________<br>
>> fpc-pascal maillist - <a href="mailto:fpc-pascal@lists.freepascal.org" target="_blank">fpc-pascal@lists.freepascal.org</a><br>
>> <a href="http://lists.freepascal.org/mailman/listinfo/fpc-pascal" target="_blank">http://lists.freepascal.org/mailman/listinfo/fpc-pascal</a><br>
><br>
><br>
><br>
> _______________________________________________<br>
> fpc-pascal maillist - <a href="mailto:fpc-pascal@lists.freepascal.org" target="_blank">fpc-pascal@lists.freepascal.org</a><br>
> <a href="http://lists.freepascal.org/mailman/listinfo/fpc-pascal" target="_blank">http://lists.freepascal.org/mailman/listinfo/fpc-pascal</a><br>
<br>
<br>
<br>
--<br>
Felipe Monteiro de Carvalho<br>
_______________________________________________<br>
fpc-pascal maillist - <a href="mailto:fpc-pascal@lists.freepascal.org" target="_blank">fpc-pascal@lists.freepascal.org</a><br>
<a href="http://lists.freepascal.org/mailman/listinfo/fpc-pascal" target="_blank">http://lists.freepascal.org/mailman/listinfo/fpc-pascal</a><br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>