Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Removing blank lines from word .doc
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01430433
Message ID:
01430444
Vues:
46
>Suppose I copy the content to "myfile.txt"
>
>Is the a simple way to remove blank links using filetostr () with some program lines ?

If the file is a REAL text file:
#define CRLF CHR(13)+CHR(10)
lcFile = FILETOSTR(....)
DO WHILE ATC(CRLF+CRLF,lcFile)
   lcFile = STRTRAN(m.lcFile, CRLF+CRLF, CRLF)
ENDDO

IF LEFT(m.lcFile,2) == CRLF && Remove first blank line
   lcFile = SUBSTR(m.lcFile,3)
ENDIF

IF RIGHT(m.lcFile,2) == CRLF && Remove last blank line
   lcFile = LEFT(m.lcFile,LEN(m.lcFile)-2)
ENDIF

STRTOFILE(lcFile,....)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform