Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Copy to excel
Message
De
16/04/2004 18:47:16
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00895748
Message ID:
00895753
Vues:
15
>I was trying to copy the records from a vfp table to an excel file from my application. When I use copy to or export command, it copies only 16384 to excel file. I need to copy more than 20000 records, Is there a way to do that?

Seems you do not have VFP8 which upped the limit (on its driver) to 65535. Previously the driver allowed only up to 16384 records.

One way around it is to save it to an old Fox DOS format and then import into Excel using automation:
USE MyTable
lcDBF = "c:\temp\MyDBF.dbf"
lcXLS = "c:\temp\MyXLS.xls" 
COPY TO (lcDBF) TYPE FOX2X
loExcel = CREATEOBJECT("Excel.Application")
WITH loExcel.Application
  .Workbooks.Open(lcDBF)
  .ActiveWorkbook.SaveAs(lcXLS, -4143, "", "", .F., .F.)
  .Workbooks.Close
ENDWITH
RELEASE loExcel
HTH


Alex Feldstein, MCP, Microsoft MVP
VFP Tips: English - Spanish
Website - Blog - Photo Gallery


"Once again, we come to the Holiday Season, a deeply religious time that each of us observes, in his own way, by going to the mall of his choice." -- Dave Barry
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform