Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Convert to excel
Message
From
02/05/2005 03:16:31
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 7
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01007983
Message ID:
01010090
Views:
26
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
>
Previous
Reply
Map
View

Click here to load this message in the networking platform