如何在Excel xll中使用xlset [英] how to use xlset in Excel xll
本文介绍了如何在Excel xll中使用xlset的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
#define rgFuncsRows 1
#define rgArguments 11
static LPSTR rgFuncs[rgFuncsRows][rgArguments] =
{
// function title, argument types, function name, arg names, type (1=func,2=cmd),
// group name (func wizard), hotkey, help ID, func help string, (repeat) argument help strings
{" AccChk", " RRR", " AccChk", " loper,roper", " 2",
" 对账插件", " ",
" ",
" 对比loper和roper,将loper在roper中不存在的作为结果",
" 目标列",
" 对比列 "
}
};
我注册这个函数是这样的:
and I register this function like this:
Excel4v( xlfRegister, &xConfirm, j+1, (LPXLOPER FAR *) &pParas[0] );
这个函数在这里定义:
this function is defined here :
XLLFIN_API LPXLOPER AccChk( LPXLOPER ld,LPXLOPER rc )
{
XLOPER12 xRef, xValue;
xRef.xltype = xltypeSRef;
xRef.val.sref.count = 1;
xRef.val.sref.ref.rwFirst = 2;
xRef.val.sref.ref.rwLast = 5;
xRef.val.sref.ref.colFirst = 5;
xRef.val.sref.ref.colLast = 7;
xValue.xltype = xltypeNum;
xValue.val.num = 323;
int rv = Excel12(xlSet, 0, 2, (LPXLOPER12)&xRef, (LPXLOPER12)&xValue);
return NULL;
}
和excel 2010中,我插入一个MS Excel 4.0宏表,然后选择一个单元格并编辑其功能= AccChk(A1 :A9,B1:B7)但功能不起作用,所需的矩形区域为空。我的目标是将数组值写入excel工作表或宏表,我该怎么办?感谢您的帮助!
and in excel 2010 ,I insert a MS Excel 4.0 macro sheet,and select a cell and edit its funtion =AccChk(A1:A9,B1:B7) but the function didn't work, the required rectangle area is empty.My target is writing an array of values into excel work sheet or macro sheet,what should I do?Thanks for your help!
推荐答案
这可能为时已晚,但是..
xlSet在工作表函数中不起作用。它只能用于所谓的Command函数,根据我的经验,它通常通过菜单调用。
如果你可以描述你想要什么做,可能有另一种方法来实现目标..
This may be too late, but..
xlSet does not work in a worksheet function. It can only be used in a so-called Command function, which in my experience, is usually invoked via a Menu.
If you could describe what exactly you want to do, there may be another way of achieving the objective..
这篇关于如何在Excel xll中使用xlset的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文