ExcelRpt_Find
- Updated2023-02-21
- 2 minute(s) read
HRESULT ExcelRpt_Find (CAObjHandle worksheetHandle, enum ExREnum_ExDataType searchDataType, void *searchData, char afterCell[], enum ExREnum_ExFindLookIn lookIn, enum ExREnum_ExLookAt lookAt, enum ExREnum_ExSearchOrder searchOrder, enum ExREnum_ExSearchDirection searchDirection, int matchCase, int matchByte, char foundCellRange[]);
Purpose
Searches a worksheet for the specified information.
Parameters
| Input | ||||||||||||||
| Name | Type | Description | ||||||||||||
| worksheetHandle | CAObjHandle | A handle to an Excel Worksheet object. | ||||||||||||
| searchDataType | enum ExREnum_ExDataType | Select the data type of the search data. The data type must be one of the following values. You can use the ExRConst_dataEmpty type to search for empty cells in the worksheet.
|
||||||||||||
| searchData | void * | The data to search for in the worksheet. The table below specifies the type of parameter value that should be passed based on the selected Search Data Type.
|
||||||||||||
| afterCell | char [] | The cell to begin searching after. This value is a string identifying the cell, such as "A1" or "$A$1". |
||||||||||||
| lookIn | enum ExREnum_ExFindLookIn | Select which part of a cell the search should examine. Must be one of the following values:
|
||||||||||||
| lookAt | enum ExREnum_ExLookAt | Specify whether the search data must match the whole cell value or any part of the cell value. Must be one of the following values:
|
||||||||||||
| searchOrder | enum ExREnum_ExSearchOrder | Specify whether to search in row order or column order. Must be one of the following values:
|
||||||||||||
| searchDirection | enum ExREnum_ExSearchDirection | Specify whether to search for the next match or the previous match.
|
||||||||||||
| matchCase | int | Specify a nonzero value or select On in the function panel to match characters on a case-sensitive basis. Specify 0 or select Off in the function panel to match characters on a case-insensitive basis. |
||||||||||||
| matchByte | int | Specify a nonzero value or select On in the function panel to match double-byte characters only against double-byte characters. Specify 0 or select Off in the function panel to match double-byte characters against equivalent single–byte characters. This value matters only if double–byte language support is being used. |
||||||||||||
| Output | ||||||||||||||
| Name | Type | Description | ||||||||||||
| foundCellRange | char [] | A string buffer containing the range of the cell that matched the search criteria. This string will be empty if no cell matches the search criteria. You must pass a string buffer at least size MAX_FOUND_CELLRANGE_LENGTH. |
||||||||||||
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