lvyue schrieb:
Hi Daniel,

I made the changes you suggested, but it doesn't work.
it is still "=NA()"

I'm tracing the code, but I didn't get any clue yet.

If you have findings, please tell me, thank you.

Try to find where compiling the formula breaks. The N/A error is an indicator for an error while creating the formula. Then the result is dropped, and the N/A error is written instead, to prevent broken formulas that would confuse (and may crash) Excel. To correctly create the formula, the following places have to be reached. The member mbOk tracks the validity of the created formula. It has to remain true all the time. otherwise there is an error somewhere.

** XclExpFmlaCompImpl::CreateFormula
The entry point.

** XclExpFmlaCompImpl::Expression
Starts compiling the entire expression.

** XclExpFmlaCompImpl::ProcessFunction
Processes the ocEuroConvert token. The call to maFuncProv.GetFuncInfoFromOpCode( eOpCode ) should return the function info for the EUROCONVERT function, check pFuncInfo.
A few lines below, the code
    if( pFuncInfo->IsMacroFunc() )
        aExtFuncData.Set( pFuncInfo->GetMacroFuncName(), false, true );
should be executed and should write the function name "EUROCONVERT" into the aExtFuncData struct.

** XclExpFmlaCompImpl::ProcessParam
Starts processing the first parameter of the EUROCONVERT function. Here, the filter should find that extra processing is needed for EUROCONVERT (due to the EXC_FUNC_PAR_EXCELONLY flag) and should call...

** XclExpFmlaCompImpl::AppendDefaultParam
Should call your new "AppendEuroToolToken()" which should execute without error (mbOk should be true afterwards). Check that the "\001\010EUTOTOOL.XLA" link is created correctly (it should because it already exists in the test file you sent me) :-)

** XclExpFmlaCompImpl::FinalizeFormula
Creates the N/A on any error (if mbOk is false).


Daniel

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to