25.6.1 Use Microsoft® Excel as a client application

Microsoft® Excel can be used as a client application using Origin's Automation Server Support. As an example, Excel can be used to send data to Origin for performing interpolation.

Excel as Client.png

In the above example, one can see the raw data (designated by the blue column headings) and the new X values for the interpolation operation. Upon clicking the "Open Origin Analysis Template" button, this information is invisibly sent from Excel to Origin and placed in the first sheet of an Analysis Template. This Analysis Template was set up to automatically update the interpolation result column (column D in the below screenshot) whenever there is a change in the source data columns (column A to C).

Analysis template for excel.png

The source data is interpolated using the Cubic Spline method. The result is also automatically graphed by Origin.

The Excel client reads the interpolated data result and displays it in the "Interpolated Y" column of the Excel worksheet. The Excel client then fetches an EMF image of the Origin graph and displays that in the Excel worksheet as well. All operations are done without ever seeing Origin!

The Excel file Interpolation.xls is located in the following subfolder of your Origin installation: \Samples\COM Server and Client\MS Office\Excel. The Analysis Template used in this example is Interpolation.opj, which is also located in the same subfolder.

How was this programmed?

On the Excel client side, the programming was performed using Visual Basic macros embedded in the Excel workbook. On the server side, the automatic interpolation and updating of the graph was performed using Analysis Template.