XMLAStringCellList

When sending commands to an XMLA server, you usually get back a list of cells. This example code shows how to execute a command that results in a list of string cells:

#define EngineVersion 5.0
#define RuntimeVersion 5.0

void XmlaPrintStringCellList(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";
    
    XMLAStringCellList result = XMLAExecuteMdxString(connection, mdx);
	
    string row = "";
	foreach (XMLAStringCell cell in result) 
	{
		row = row + XMLAGetValue(cell) + "; ";		
	}
	WriteLine(row);	
}

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