Last active
September 18, 2022 23:38
-
-
Save kun432/aee19bdd8aa8a0594e26e8a9e9df5629 to your computer and use it in GitHub Desktop.
3,4コーナーの位置取りから隊列を可視化する
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function createTairetsu() { | |
var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
var sheet = ss.getSheets()[0]; | |
sheet.insertColumnBefore(14); | |
sheet.insertColumnBefore(16); | |
sheet.getRange('N1').activate(); | |
sheet.getCurrentCell().setValue('前走:3コーナー推定隊列'); | |
sheet.getRange('N2').activate(); | |
sheet.getCurrentCell().setFormula('=IFERROR(CONCATENATE(REPT(" ",M2-1),CHAR(M2+CODE("①")-1),REPT(" ",18-M2)),REPT("―",18))'); | |
sheet.getActiveRange().autoFill(sheet.getRange(2,14,ss.getLastRow() - 1, 1), SpreadsheetApp.AutoFillSeries.DEFAULT_SERIES); | |
sheet.getRange('P1').activate(); | |
sheet.getCurrentCell().setValue('前走:4コーナー推定隊列'); | |
sheet.getRange('P2').activate(); | |
sheet.getCurrentCell().setFormula('=IFERROR(CONCATENATE(REPT(" ",O2-1),CHAR(O2+CODE("①")-1),REPT(" ",18-O2)),REPT("―",18))'); | |
sheet.getActiveRange().autoFill(sheet.getRange(2,16,ss.getLastRow() - 1, 1), SpreadsheetApp.AutoFillSeries.DEFAULT_SERIES); | |
sheet.setColumnWidth(14,271); | |
sheet.setColumnWidth(16,271); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment