Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel Chart Axis labels
Message
From
05/09/2008 18:47:16
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Excel Chart Axis labels
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01345282
Message ID:
01345282
Views:
47
I have a custom class that is used to assist with Excel automation. I am trying to add a function to set the range of the labels for the x axis. I have tried many variations of the syntax but can't seem to get it right. My current try is
function SetXLabels(cRange)
	oSheet = this.oExcel.ActiveSheet
	this.oExcel.ActiveChart.SeriesCollection(1).XValues = oSheet.range(cRange)
	endfunc
If I was working without the custom class, this would work.
oExcel.Activechart.SeriesCollection(1).XValues = oSheet.range('A10:A22')
The function errors on the last line that says 'OLE error code 0x80020006: Unknown Name'
The value of cRange is "A10:A22"

Can someone help please.

Thanks
Next
Reply
Map
View

Click here to load this message in the networking platform