Skip to content

Instantly share code, notes, and snippets.

@mayukojpn
Created June 5, 2015 15:09
Show Gist options
  • Select an option

  • Save mayukojpn/97f8a0b0f9d275eb355f to your computer and use it in GitHub Desktop.

Select an option

Save mayukojpn/97f8a0b0f9d275eb355f to your computer and use it in GitHub Desktop.
Google Spreadsheet でタテヨコ入れ替える Google Apps Script
// 1. 以下のスクリプトを実行
function myFunction(){
var sheet = SpreadsheetApp.getActiveSheet();
for(var i = 1;i <= 30;i++){
for(var j = 1;j <= 35;j++){
sheet.getRange(i+99,j).setValue(sheet.getRange(j,i).getValue());
}
}
}
// 2. 100 列目以降に、左右反転してる表ができます
// 3. あとはよしなに。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment