Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How To Change Excel Column Names From VFP
Message
De
03/06/1999 08:28:06
 
 
À
Tous
Information générale
Forum:
Microsoft Office
Catégorie:
Excel
Titre:
How To Change Excel Column Names From VFP
Divers
Thread ID:
00225875
Message ID:
00225875
Vues:
68
I am calling Excel from VFP 6.0. I need to change some of the column names programmatically. I've gotten this far:
1. startup Excel
2. select the desired spreadsheet
3. select the desired cell
But here I am stuck.

Here's the code I used for the above steps:
1. ThisForm.oExcel = CreateObject("Excel.Application")
2. ThisForm.oExcel.Workbooks.Open("my spreadsheet")
3. ThisForm.oExcel.Range("E1").Select && selects the 5th column

For the 4th step, I've tried things like: ActiveCellFormulaR1C1 = "the desired text"

This actually works when executed from the VFP command window (substituting a private variable for the object reference to Excel instead of "Thisform.oExcel"), but it blows up when it executes in code.

TIA, Chaim
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform