LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

the function CA_VariantClear() spend too much time

when i use the function:

HRESULT CVIFUNC ExcelRpt_GetRangeDataType(CAObjHandle worksheetHandle, const char *cellRange,enum ExREnum_ExDataType *dataType)

when cellRange is D2:F510000 ,i found it spend too much time ,about 110 seconds。

when i use timer() to find the time executed inside of ExcelRpt_GetRangeDataType,

i found the code below spend about 90 seconds.

if (Varray) 
{
    for (i=0; i < dim1; i++)
    for (j=0; j < dim2; j++)
    CA_VariantClear (&Varray[i*dim2+j]);
   CA_FreeMemory (Varray);
}

 

can anyone have some advice about read large range of cells .

0 Kudos
Message 1 of 1
(1,975 Views)