LabWindows/CVI

ExcelRpt_InsertPicture

int ExcelRpt_InsertPicture (CAObjHandle worksheetHandle, char fileName[], int top, int left, int width, int height);

Purpose

Inserts a picture into the worksheet.

Parameters

Input
Name Type Description
worksheetHandle CAObjHandle A handle to an Excel Worksheet object.
fileName char [] The pathname of the image file you want to insert.
top int The position where the top edge of the picture will be located in the worksheet. This value is specified in points. 1 point = 1/72 inches.
left int The position where the left edge of the picture will be located in the worksheet. This value is specified in points. 1 point = 1/72 inches.
width int The width of the picture in the worksheet. This value is specified in points. 1 point = 1/72 inches.
height int The height of the picture in the worksheet. This value is specified in points. 1 point = 1/72 inches.

Return Value

Name Type Description
status int 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