Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Exporting the contents of memo fields to Excel etc.
Message
De
20/01/1997 21:45:11
 
 
À
20/01/1997 12:51:24
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00017887
Message ID:
00017928
Vues:
81
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
*
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform