アットウィキロゴ

g foof;le

function sample() {
 
  var point=new Array(); 
 
  for(s=1;s<101;s++){
  point[s]=100*Math.random();
  }
 
  maxp=0;
   for(s=1;s<101;s++){
  if(point[s]>maxp)maxp=point[s];
  }
 
 
 
 
 id="14Z1-QWaoAg1Sa4NXnNI80gB5F3_xelKyvfDRNZF_z4g"; 
 var ex1 = SpreadsheetApp.openById(id);
 var sheet = ex1.getSheetByName("data");
 
 
 sheet.getRange(1,1,100,100).setBackground('white');  
 
for(s=1;s<101;s++){  
sheet.setColumnWidth(s, 10)
sheet.setRowHeight(s, 10);
} 
 
for(sx=1;sx<101;sx++){  
s2=(100*point[sx])/maxp;
s1=100-Math.floor(s2);
if(s1<1)s1=1;  
for(s=s1;s<101;s++){   
 sheet.getRange(s,sx).setBackground('red');  
  }
  }
 
 
 
 
 
}
 
最終更新:2017年07月15日 22:04