Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
OLE Automation
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00030577
Message ID:
00030609
Views:
34
>
>LOCAL nTotSeries,i
>public oXLChart1
>oXLChart1 = GetObject('','excel.chart')
>oXLChart1.application.charts[1].haslegend = .F.
>oXLChart1.application.visible = .t.
>oXLChart1.application.worksheets(1).cells().clear
>
>_cliptext = ""+TAB+"Cats"+TAB+"Dogs"+CRLF+;
> "1994"+TAB+"11"+TAB+"22"+CRLF+;
> "1995"+TAB+"33"+TAB+"44"+CRLF+;
> "1996"+TAB+"55"+TAB+"55"+CRLF
>
>oXLChart1.application.worksheets(1).cells(1,1).pastespecial
>oXLChart1.application.charts[1].autoformat(-4100,1)
>
>* Remove extra series added by Excel
>nTotSeries = oXLChart1.application.charts[1].SeriesCollection().count
>FOR i = m.nTotSeries to 4 STEP -1
> oXLChart1.application.charts[1].SeriesCollection(m.i).delete
>ENDFOR
>oXLChart1.application.charts[1].haslegend = .T.
>

try

oXLChart1.release

at the end of your code.

HTH
Todd Burstain, MD
infinitydoc@delphi.com
Previous
Reply
Map
View

Click here to load this message in the networking platform