Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cells and Ranges in Excel
Message
 
 
À
25/10/2002 04:49:26
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00715250
Message ID:
00716292
Vues:
23
Yes, you are right Cetin. This can go in my archive of handy code snippets - there will come a day!

>OK, figured it out, I can just use loExcel.Range(loExcel.Cells(n,n), loExcel.Cells(n,n)) instead of loExcel.Range('An:An')

:) One day this might come handy :



* Return A, AA, BC etc noation for nth column
FUNCTION _GetChar
LPARAMETERS tnColumn && Convert tnvalue to Excel alpha notation
IF tnColumn = 0
RETURN ""
ENDIF
IF tnColumn <= 26
RETURN chr(asc("A")-1+tnColumn)
ELSE
RETURN _GetChar(int(iif(tnColumn % 26 = 0, ;
tnColumn - 1, tnColumn) / 26)) + ;
_GetChar((tnColumn-1)%26+1)
ENDIF
Cetin
- Craig

"If you're not prepared to be wrong, you will never come up with anything original."
- Sir Ken Robinson
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform