The function Excel is a wrapper around the Microsoft Excel SDK functions Excel4 and Excel12. It knows how to handle the memory protocols Excel uses so you don't need to.

Anything you can do in Excel and VBA you can do with this function. You don't need to know how to use this now, but when you are ready you can find a complete description of all the fuctionality available to you here.

For example, to get and set ranges in a spread sheet you could use the macro:

static AddIn xai_macro("?xll_macro", "XLL.MACRO");
	OPER a1c2(0, 0, 2, 3); 
	// or a1c2 = ExcelX(xlfTextref, OPER("A1:C2"), OPER(true));

	OPER get = ExcelX(xlCoerce, a1c2);

	get(0,0) = "a string";

	ExcelX(xlSet, a1c2, get);

	return 1; // success

Last edited Feb 21, 2013 at 9:51 PM by keithalewis, version 8


No comments yet.