> oExcel = CREATEOBJECT("Excel.Application")
> oExcel.oWorkBook = .workbooks.add
> oExcel.oSheet = oWorkbook.worksheets(1)
>
> oRange = oSheet.range("B1:E1,B4:E4")
> oChartSheet = oExcel.sheets(2)
> oChart = oExcel.charts.add
> oChart.charttype =70
> oChartSheet.activate
> oChart.SetSourceData(oRange, 2)
> ochart.ApplyDataLabels(5, .f., .f., .f.)
> oChart.location(2, oChartSheet.name)
> .Visible = .T.
That works for me:
LOCAL oExcel AS Excel.Application
oExcel = CREATEOBJECT("Excel.Application")
oExcel.Visible = .T.
oWorkBook = oExcel.Workbooks.Add() && oWorkBook not oExcel.oWorkBook
oSheet = oWorkbook.worksheets(1) && oSheet not oExcel.oSheet
oRange = oSheet.range("B1:E1;B4:E4") && With semi-colon, not with comma, but i suspect that depends of regional settings of the computer
oChartSheet = oExcel.sheets(2)
oChart = oExcel.charts.add
oChart.charttype = 70
oChartSheet.activate()
oChart.SetSourceData(oRange, 2)
ochart.ApplyDataLabels(5, .f., .f., .f.)
oChart.location(2, oChartSheet.name)
Unfortunately I have no Office 97 to test this.
-----------------
Borislav Borissov
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von SchillerThe only thing normal about database guys is their tables.