Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How To Change Excel Column Names From VFP
Message
From
03/06/1999 08:28:06
 
 
To
All
General information
Forum:
Microsoft Office
Category:
Excel
Title:
How To Change Excel Column Names From VFP
Miscellaneous
Thread ID:
00225875
Message ID:
00225875
Views:
67
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
Next
Reply
Map
View

Click here to load this message in the networking platform