Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating an Excel graph
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Creating an Excel graph
Miscellaneous
Thread ID:
01136592
Message ID:
01136592
Views:
58
I have some code that evidently worked in VFP6 a few years ago, but when copied into VFP9, it will not compile. (I actually wrote the code as a one time fix for a customer, but I've no idea where I got it from, and did the whole thing in a rush with no docs. Now a customer wants it retrofitted into the new version of the system) The code is supposed to bring up Excel and create a graph in a worksheet.

It starts with oExcel=CreateObject("Excel.Application")

the problem code is in this - it does not like ExcelColumn
	with oBook.Sheets[1]
		IF pType=1
			SELECT (pWorkarea)
			GO top
			for x = 1 to fcount()
				cCol=ExcelColumn(x)  
				.Range(cCol+"1").Value = FIELD(x)
			ENDFOR 
I stuck in DIMENSION ExcelColumn[99] && Just guessing to make it compile

and it then compiles and runs, but gets some run time error messages and only create the graph frame in Excel

I could do with a link to somewhere where I can figure out what is going on and fix the code.
Next
Reply
Map
View

Click here to load this message in the networking platform