Forum Discussion
RyanParker
Oct 20, 2022Copper Contributor
Struggling with an office script
I've got a list of ingredients that the user can input onto a table. I'd like them to be able to save this list to create a recipe by clicking a script button. This would then transpose the data, cop...
JKPieterse
Oct 21, 2022Silver Contributor
Change this line:
recipeList.getRange("A2").copyFrom(recipeList.getRange("A2:T4"), ExcelScript.RangeCopyType.values, false, false);
to:
recipeList.getRange("A1000000").getRangeEdge(ExcelScript.KeyboardDirection.up).getOffsetRange(1,0).copyFrom(recipeList.getRange("A2:T4"), ExcelScript.RangeCopyType.values, false, false);