LabWindows/CVI

ExcelRpt_ChartAddtoWorksheet

HRESULT ExcelRpt_ChartAddtoWorksheet (CAObjHandle worksheetHandle, double left, double top, double width, double height, CAObjHandle *chartHandle);

Purpose

Creates a new embedded chart in a worksheet.

Parameters

Input
Name Type Description
worksheetHandle CAObjHandle A handle to an Excel Worksheet object.
left double The position where the left edge of the embedded chart will be located in the worksheet. This value is specified in points. 1 point = 1/72 inches.
top double The position where the top edge of the embedded chart will be located in the worksheet. This value is specified in points. 1 point = 1/72 inches.
width double The width of the embedded chart in the worksheet. This value is specified in points. 1 point = 1/72 inches.
height double The height of the embedded chart in the worksheet. This value is specified in points. 1 point = 1/72 inches.
Output
Name Type Description
chartHandle CAObjHandle A handle to the new Excel Chart object.

When it is no longer needed, this handle must be discarded using CA_DiscardObjHandle.

Return Value

Name Type Description
status HRESULT A value indicating whether an error occurred. Function failure is indicated by a negative error code.

Error codes are defined in CVIversion\include\cviauto.h and <Program Files>\National Instruments\Shared\MSDTRedistributables\SDKHeaderFiles\8.1\winerror.h.

You can use CA_GetAutomationErrorString to get the description of an error code.

Additional Information

Library: Excel Report

Include file: activex\excel\ExcelReport.h

LabWindows/CVI compatibility: LabWindows/CVI 7.0 and later