wps表格中的js宏代码:巧用eval(a)
function g1(a)
{
console.log(a)
var aa=eval(a)
return aa
}
Quicker中C#的函数
//.cs 文件类型,便于外部编辑时使用
// 引用必要的命名空间
using System.Windows.Forms;
using Excel = Microsoft.Office.Interop.Excel;
// Quicker将会调用的函数。可以根据需要修改返回值类型。
public static void Exec(Quicker.Public.IStepContext context)
{
Excel.Application excelApp = (Excel.Application)System.Runtime.InteropServices.Marshal.GetActiveObject("Excel.Application");
var oldValue = context.GetVarValue("g1"); // 读取动作里的变量值
var bb=excelApp.Run("g1",oldValue);//TOROW(C2:E5) g.fg
context.SetVarValue("g2", bb);
}
修订版本 | 更新时间 | 更新说明 |
---|---|---|
2 | 1天17小时前 | 2 |
1 | 1天18小时前 | 1 |
0 | 1天19小时前 |