XMLAIntCellList

This example code shows how to execute a command that results in a list of integer cells:

#define EngineVersion 3.0
#define RuntimeVersion 3.0

void XmlaPrintIntCellList(XMLAConnection connection)
{
    string mdx = "select [MEASURES].[Sales] on 0, [REGIONS].[Europe (East/West)].[Eastern Europe].[Bulgaria] on 1, {[PRODUCTS].[Total].[Total Monitors].children, [PRODUCTS].[Total].[Total Monitors]} on 2 from TotSales";
    
    XMLAIntCellList result = XMLAExecuteMdxInt(connection, mdx);
	
    string row = "";
	foreach (XMLAIntCell cell in result) 
	{
		row = row + XMLAGetValue(cell) + "; ";		
	}
	WriteLine(row);	
}

To store a list of integer cells, use the XMLAIntCellList data type. Then, to loop through the list of cells, use the foreach statement.