JavaScript Editor js editor     Web development 



Main Page

File: ...\Samples\Solution\OLE\Oleaut1.scx

This is a simple sample showing Visual FoxPro as an Automation controller. It demonstrates how to select data from a Visual FoxPro database, place the data in a Microsoft Excel worksheet, graph the data using Chart, and then display the graph in Word. To use this sample, you need at least Excel 5.0, Word 6.0, and Testdata.dbc, located in the ...\Samples\Data directory.

The following line of code creates a reference to a Microsoft Excel spreadsheet.

В Copy Code
objXLsheet=createobject("Excel.Sheet")

The following line of code adds a chart to the spreadsheet.

В Copy Code
objChart1 = objXLsheet.ChartObjects.Add(100, 100, 200, 200)

The following line of code creates a reference to Microsoft Word.

В Copy Code
objWDdoc=createobject("word.basic")

oWordRef = GetObject('','word.basic')

See Also



JavaScript Editor js editor     Web development