Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Single call to excel
Message
From
13/04/2007 13:22:07
 
 
To
11/04/2007 11:36:23
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
01213473
Message ID:
01215629
Views:
19
>>>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.
you can use an array to write data to a range


peter
Peter Cortiel
Previous
Reply
Map
View

Click here to load this message in the networking platform