LabWindows/CVI

ExcelRpt_WriteDataFromTableControl

HRESULT ExcelRpt_WriteDataFromTableControl (CAObjHandle worksheetHandle, char cellRange[], int panelHandle, int controlID);

Purpose

Writes data from a CVI table control to a cell range in Excel.

Parameters

Input
Name Type Description
worksheetHandle CAObjHandle A handle to an Excel Worksheet object.
cellRange char [] A rectangular range of cells.

This value should be a string containing the cell range, such as "A1" or "A1:D5".

Data is written starting at the upper leftmost cell in the cell range. The cell range does not have to have the same dimensions as the CVI table control.
panelHandle int The specifier for a particular panel that is currently in memory.

This handle will have been returned by the LoadPanel, NewPanel, or DuplicatePanel function.
controlID int The defined constant, located in the .uir header file, that you assigned to the control in the User Interface Editor, or the ID returned by NewCtrl or DuplicateCtrl.

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

Log in to get a better experience