Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Convert to excel
Message
De
02/05/2005 03:16:31
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 7
Database:
Visual FoxPro
Divers
Thread ID:
01007983
Message ID:
01010090
Vues:
27
hi,
any help, idea.
i try , i get 6 parts, but when i try to open first part as excel sheet , the data is not arrange.as dbf file.
thanks.

>Copy to XLS in VFP versions before VFP8 supports only 16000 rows.
>If you have more then 16000 rows you can split the file to multiple XLS files with 16000 rows in every.
>
>USE active1
>gcDelimName = ALIAS( ) + '.xls'
>gcDelimFile = PUTFILE('excel_file:', gcDelimName, 'xls')
>IF EMPTY(gcDelimFile)
>   RETURN
>ENDIF
>IF RECCOUNT() < 16001
>   COPY TO (gcDelimFile) XLS   && Create delimited file
>ELSE
>   gcDelimFile = PUTFILE('excel_file:', gcDelimName, 'xls')
>   cFilePath = ADDBS(JUSTPATH(gcDelimFile))
>   cFileName = JUSTSTEM(gcDelimFile)
>   cFileExt  = JUSTEXT(gcDelimFile)
>   nFileCnt  = 1
>   GO TOP
>   DO WHILE .NOT. EOF()
>      cTarget = cFilePath+cFileName+"_"+ALLTRIM(STR(nFileCnt))+"."+cFileExt
>      nFileCnt= nFileCnt + 1
>      COPY TO (cTarget) NEXT 16000
>   ENDDO
>ENDIF
>
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform