none
Copying a file to EXCEL from FoxPro.

    Question

  • PLEASE HELP!

    I'm using Visual FoxPro 6.0 and EXCEL 2003.  I created a query with FoxPro 6.0 and copied the data to EXCEL 2003.  The Table size is 33827 records and it only copied 16384 records.  It only copied half the code.  Why is this?

    Here is the code.

    close data all
    set talk on
    set dele on


    SELECT 0
    USE "c:\documents and settings\bartech\my documents\fmpdata\software code\fmp reports\fmptables\line02.dbf" shared


    select *;
     from line02;
     group by 3,4,5,6;
     order by 3,4,5;
     into cursor x

    select x

    copy to c:\line02wmake&model.xls type xls

    Friday, October 28, 2005 2:54 PM

Answers

  • You ask, "Why is this"?
    It is a limitation of the very old driver you are using.

    As Çetin said, you can copy to CSV or you can also copy to an old style free (fox 2.x) DBF and then import from Excel.

    Or you could upgrade to a more recent version of VFP (VFP 6.0 is way too old).
    Friday, October 28, 2005 5:17 PM
  • Use TYPE XL5 rather than XLS. XLS is Excel 2.0, which had a smaller limit than XL5.

    Tamar
    Friday, October 28, 2005 8:40 PM
    Answerer

All replies

  • select * ;
     from ("c:\documents and settings\bartech\"+;
       "my documents\fmpdata\software code\fmp reports\fmptables\line02.dbf" ) ;
     group by 3,4,5,6;
     order by 3,4,5;
     into cursor x

    copy to c:\line02wmake&model.xls type csv
    * or
    *copy to c:\line02wmake&model.xls type fox2x

    There are other ways too.

    Friday, October 28, 2005 4:10 PM
  • You ask, "Why is this"?
    It is a limitation of the very old driver you are using.

    As Çetin said, you can copy to CSV or you can also copy to an old style free (fox 2.x) DBF and then import from Excel.

    Or you could upgrade to a more recent version of VFP (VFP 6.0 is way too old).
    Friday, October 28, 2005 5:17 PM
  • Thank You very much!  Both of you!
    Friday, October 28, 2005 6:14 PM
  • Use TYPE XL5 rather than XLS. XLS is Excel 2.0, which had a smaller limit than XL5.

    Tamar
    Friday, October 28, 2005 8:40 PM
    Answerer
  • I faced the same problem before.  This is the limitation when copy the data to xls.  You can check if the reccount() >16000 then copy to csv file format; or

    directly write the records to spreedsheet by VBA scripts.

    Edward

    Wednesday, September 06, 2006 7:31 AM
  • may be after u group the number of records are only 16384. u can check this

    set talk on

    select *;
     from line02;
     group by 3,4,5,6;
     order by 3,4,5;
     into cursor x

    select x

    count

    go top

    copy to c:\line02wmake&model.xls type xls

    if the count gives u only 16384 records, then it is correct.

    u can also redirect to dbf rather than cursor and open the dbf in excel directly.

     

    thanks

     

    Friday, September 08, 2006 5:28 AM