Hi Geoff.
I came across with a similar problem. Once, my user created a so-called "FAULT" database for himself and his technicians. Sometime later,... , he wanted to export it to Excel, but ... Well, you know the rest of the story.
I read the file, wrote it to other file, then used copy to ... type XLS as normal. If you really need a quick one, this would probably help you.
Tom.
Please email me if you need further discussion:
tkaran@accsoft.com.au or
tom@dapro.com.au .
* SAMPLE.DBF's structure is :
* OUR_REF C(10), RPT_FAULT <<--- memo field
wait window 'Start...' nowait
set safety off
create table XLSFILE (OUR_REF C(10),;
REF_LINE N(2),;
RPT_FAULT C(50))
close all
* Initialize variables
cOurRef=""
cRptFault=""
*
sele 0
use XLSFILE alias XLSFILE excl
sele 0
use SAMPLE alias SAMPLE shared
sele 0
sele SAMPLE
scan
cOurRef=OUR_REF
nMaxLine=memlines(RPT_FAULT)
for nCurLine=1 to nMaxLine
if nCurLine<=nRptLines
cRptFault=mline(SAMPLE.RPT_FAULT,nCurLine)
else
cRptFault=''
endif
insert into XLSFILE (OUR_REF, REF_LINE, RPT_FAULT) ;
values (cOurRef, nCurLine, cRptFault)
endfor
sele SAMPLE
endscan
sele XLSFILE
COPY TO XLSFILE TYPE XLS
close all
? chr(7)
wait window 'Completed!!!' nowait
*