Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to Create a Chart (Graph) in Excel from VFP 6
Message
From
13/01/2005 09:47:28
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
How to Create a Chart (Graph) in Excel from VFP 6
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows 2000 SP4
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00976746
Message ID:
00976746
Views:
51
I know how to create an excel worksheet from foxpro and select a range

_filenm = 'c:\test.csv'

_oExcel = CreateObject('Excel.Application')
_oExcel.DisplayAlerts = .F. && Keep Excel from prompting to save data
_oExcel.Visible = .F. && Don't show EXCEL yet...
_oExcel.WorkBooks.Open(_filenm,,.F.) && Now try to Open the CSV file in EXCEL

At this point I want to create a chart from everything I have sent - it excel sheet will have 1 character column (x-axis) and 1 or more numeric fields to the right.

I tried _oExcel.charts.add and this works but I have no control over the chart to give other parameters and I have tried to decipher excel macros. I would like to create a chart in the current worksheet and produce 3 different types of charts.

Otherwise, maybe it would be better if I could send a command to _oExcel to add a macro on the fly into the Excel worksheet that would then just be a copy of a macro I get from an existing worksheet previously (_oExcel.application.add "My Macro1"?) followed by _oExcel.run "MyMacro1"

thanks in advance....

Demetrius
I know of no more encouraging fact than the unquestionable ability of man to elevate his life by a conscious endeavor.

Henry Thoreau
Next
Reply
Map
View

Click here to load this message in the networking platform