-2
저는 JavaScript가 처음이에요. 저는 약간의 자동화 작업을하고 싶습니다. 도움이 필요하면 궁금합니다. 스프레드 시트 A는 B2에서 시작하는 B 열의 데이터가있는 알 수없는 셀 수를 가질 수있는 템플릿입니다. 만든 애드온 메뉴 버튼을 클릭하면 새 스프레드 시트 (스프레드 시트 B)가 만들어 지지만 스프레드 시트 A의 스프레드 시트 B 열 B의 데이터를 기반으로 새 시트에 스프레드 시트 B를 채우려는 경우Google 스프레드 시트 - 알 수없는 길이의 열에서 새 스프레드 시트에 새 시트 만들기
이 코드는 While 루프 내에 있어야하지만 스프레드 시트로 작업하면 다소 혼란 스럽습니다.
감사합니다. 스프레드 시트 A로부터
복사 이러한 세포 :
스프레드 시트 B에서 스프레드 시트 A는 세포를 기반으로 새로운 시트 만들기 :
는 지금까지이입니다 내가 가진 것 :
여기function pickListCreation(){
//This line creates Spreadsheet B (New Pick List)
var newPickList = SpreadsheetApp.create("New Pick List");
Logger.log(newPickList.getUrl());
var app = SpreadsheetApp;
var activeSheet = app.getActiveSpreadsheet();
//Data in Column B from Spreadsheet A will be Room Numbers. Room Number variable declared
var roomNumber = activeSheet.getRange(2,2);
//While loop that will run as long as there is data in the cell of Column B in Spreadsheet A
while (roomNumber.isBlank() !== false){
//Variable newPickSheet that is set to the value of the current cell
var newPickSheet = roomNumber.getValue();
//Insert new sheet with newPickSheet as the title in newPickList (Spreadsheet B)
newPickList.insertSheet(newPickSheet);
//Move down one cell in the column
roomNumber = activeSheet.getRange(i+1, 2);
}
}
당신이 지금까지 쓴 스크립트를 게시 할 수 있습니까? –
또한 질문을 개선해야합니다. 다음은 좋은 질문을 작성하는 방법에 대한 참조입니다. https://stackoverflow.com/help/how-to-ask –
내 게시물을 편집했습니다. 모든 코멘트에 대해 유감스럽게 생각하지만 최대한 자세하게하려고했습니다. – Adam