Re: How to preprocess part of information of excel in CP

Hi,

I do not have your complete data and global intent, but let me remind you that with scripting you can do whatever you need:

.mod

range r=1..15;
 {string} DisciplineForLargeroom[r] =  …;  
 
 int nb=sum(i in r) card(DisciplineForLargeroom[i]);
 
 string newVector[1..nb];
 
 execute
 {
 var k=0;
 
 for(i in r)
  for(j in DisciplineForLargeroom[i])
  {
    k++;
    newVector[k]=j;  
  }
 
  writeln(newVector);
 }

.dat

DisciplineForLargeroom =   [{“Biology”} {“Economy” “d”} {“French”} {“Geography”} { } {“History”} {“Maths”
         “g”} {“Physics”} {“Sport”} { } {“a”} {“e”} {“c”} {“b”} {“f”}] ;

gives

 

[“Biology” “Economy” “d” “French” “Geography” “History” “Maths” “g” “Physics”
     “Sport” “a” “e” “c” “b” “f”]

regards

Source: Re: How to preprocess part of information of excel in CP