Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Excel has 16,384 row limit
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00438600
Message ID:
00438626
Vues:
13
>I am trying to copy 60,000 records into an excel worksheet by OLE automation. I have vfp 6.0 sp4 and Office 2000. I used the copy to command with type XLS to create the excel file. The worksheet only contains 16,384 rows. How can i get the worksheet to contain 65,000 rows? Thanks in advance.
>
>Bob Neal

I ran into the same problem a few weeks ago. The work around I came up with is to use the copy to command with type fox2x. Then you can open excel with automation and open the fox2x dbf in excel. Then save the fox2x dbf as an excel spread sheet and then delete the fox2x dbf. Here is some code:


copy to (lcFileName) type fox2x
oExcel = CREATEOBJECT('excel.application')
o = oExcel.WorkBooks.OPEN(lcFileName)
o.saveas(lcExcelFileName,-4143)
o.Close


The key is the -4143 in the saveas method. This tells excel to save as the curent xls version.
Rip Ryness
International Falls, MN
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform