Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to end a copy on Excel
Message
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00958704
Message ID:
01133821
Views:
17
><snip>
>>the range property does not take numeric refrences like .range(999,2:999,60) it needs an alpha "A900:AH900" to do a copy, so I copy the first cell with the formula and then pase n times to the right the formla and it works.
><snip>
>
>I don't know if it helps but it's easy to convert column number into column reference.
nCol = 222
>
>* using Excel
>cColRef = oWorkSeet.Cells(1,nCol).Address(.T.,.F.,1)
>cColLetter = LEFT(cColRef, AT("$", cColRef)-1)
>
>* VFP code only
>cColLetter = IIF(nCol>26, CHR(Int((nCol - 1) / 26) + 64), "") + ;
>              CHR(((nCol - 1) % 26) + 65)
>
>
>
Thanks a lot. Exactly what I need.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform