Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copy VFP Array to Excel
Message
 
To
09/12/2005 13:21:16
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01076673
Message ID:
01076690
Views:
31
Cetin,

Yes, I understand that VFP works this way, but why? It look like a bug to me:
dimension a1[200]
dimension a2[200,1]

One may then ask, how many columns there are in a1 and in a2?

?Alen(a1,2)  && returns 0   ??
?alen(a2,2)  && returns 1
>
>Yuri,
>I think it's the way VFP works. Result would be the same if you appended tmp_array2 to a cursor (single row). So in effect excel sees it:
>.Range(...).Cells.Value = 'ConstantValue'
>
>Whenever I work with append from or excel copy I redimension the array like this:
>
>Dimension tmp_array2[Alen(tmp_array2,1),Max(1,Alen(tmp_array2,2))]
>
>PS: To be more clear to Excel it's on a single row (single row, 200 columns):
>.Cells(1,1),.cells(1,Alen(tmp_array2,1)).Value = ...
>
>Cetin
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform