Hi,Arnon
I install Excel 7.0 in win95 and then everything is ok! Thank you!
I show you one part of my program :
If !used(company)
use company
Endif
SELECT company, count(company) ;
FROM (company) ;
GROUP BY company ;
HAVING COUNT(company) > 1 ;
INTO array comp_dis
objXLsheet=crea("Excel.Sheet")
objXLsheet.application.visible=.T.
* Copy data to an excel spreadsheet
for i = 1 to _TALLY
objXLsheet.Cells(i,1).Value = comp_dis(i,1)
objXLsheet.Cells(i,2).Value = comp_dis(i,2)
endfor
* Add a ChartObject to the worksheet:
objChart1 = objXLsheet.ChartObjects.Add(100, 100, 200, 200)
* Create the chart.
objxlsheet.chartobjects(1).chart.;
chartwizard(objxlsheet.range(objxlsheet.cells(1,1),objxlsheet.cells(10,2)),;
-4100,4,1,0,1,1,"","","","")
ObjXLsheet.ChartObjects(1).select
ObjXLsheet.ChartObjects(1).copy
objXLsheet.application.quit
release objXLsheet
Now, I have a new question,can you help me?
I think that the program running result is not better.
1. when it runs it will go into Excel's eviroment and also display
graphy in Excel's eviroment. The only result I want is display
the graphy in my form. Arnon, how to display the result in vfp's
form?
2. I don't know detials of the Parameters for chartwizard. I want to
create 2D line graphy. So, how to set the patameters in the function.
I ever heard someone say The best way to find the correct parameters
is to record the same steps as macro in the server application.
Then edit the macro and copy the parameters and paste them into Visual FoxPro. If it can do it, how to do it?
kevin
Kevin Wang
Programmer&Analyst
Ministry of Water Resources
No.1,Baiguang Road
Beijing,China