Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Single call to excel
Message
De
11/04/2007 11:36:23
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
01213473
Message ID:
01214469
Vues:
15
>>I recall someone giving me advice on sending a batch of data to excel in a single call rather than sending each cell explicitly, but I am unable to locate my notes on the subject. Would someone indulge my lack of memory and organization and share that technique with me again?
>>
>>Thanks
>
>See if this Re: Best way to re-factor Thread #1135774 Message #1135791 can be of any help. I use Cetin's technique if I have a file with memo fields, otherwise just use copy to (will copy 16K records only) and then apply some formatting.

Copy to xl5 and then applying some formatting is a fairly easy and fast way to do it if you want a standard spreadsheet, but if you want something special where the record occupies multiple rows in excel the challenge is a little more difficult. I typically use a scan loop or a for/next like:
for i = 1 to reccount()
cell = "A" + transform(i)
.range(cell).value = field1
cell = "B" + i
.range(cell).value = field2
* etc
next
but this one cell at a time is slow due to the multiple calls to excel. Same with formatting calls.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform