How to export into a csv file ?

Hi,

 

I am often asked this so let me give an example:

tuple t
{
string firstname;
int number;
}

{t} s={<"Nicolas",2>,<"Alexander",3>};

execute
{
var f=new IloOplOutputFile(“export.csv”);
for(var i in s)
{
f.writeln(i.firstname,”;”,i.number,”;”);
}
f.close();
}

writes a file export.csv

Nicolas;2;
Alexander;3;

regards

Source: How to export into a csv file ?