简体   繁体   English

Google Apps 脚本:将选定的单元格复制并粘贴到另一个工作表,然后从源中删除

[英]Google Apps Script: Copy and paste selected cell to another sheet, then delete from source

I am completely new to google apps script - any help is appreciated!我对谷歌应用程序脚本完全陌生 - 感谢任何帮助!

I have a spreadsheet called Dismissal.我有一个名为 Dismissal 的电子表格。 On this spreadsheet, there is a tab called "Student Names" and another called "Check Out".在这个电子表格上,有一个名为“学生姓名”的选项卡和另一个名为“结帐”的选项卡。 I am wondering if there is a script to copy whichever cell is selected from the Student Names tab and paste it to the first empty row in column A of the Check Out tab - and then delete the cell from the source (the Student Names tab), or at least clear the contents of the cell on the source.我想知道是否有一个脚本可以复制从“学生姓名”选项卡中选择的任何单元格并将其粘贴到“签出”选项卡的 A 列中的第一个空行 - 然后从源中删除该单元格(“学生姓名”选项卡) ,或者至少清除源上单元格的内容。

Please let me know if you need any more details.如果您需要更多详细信息,请告诉我。 Thank you so much --太感谢了 -

Copy Student Name to Check Out复制学生姓名以结帐

function copyNameToCheckOut() {
  const ss = SpreadsheetApp.getActive();
  const sh = ss.getSheetByName("Student Names");
  const dsh = ss.getSheetByName("Check Out");
  sh.getActiveCell().copyTo(dsh.getRange(dsh.getLastRow() + 1, 1));
  sh.getActiveCell().clearContent();
}

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 从Google驱动器中可用的所有工作表中复制特定的单元格值,然后使用应用脚本粘贴到主工作表中 - Copy specific cell value from all sheets which are available in the google drive and paste in master sheet with apps script Google Sheets + Apps Scripts,从一个工作表复制/粘贴到另一个工作表,但粘贴到特定列 (B) 中的第一个空单元格 - Google Sheets + Apps Scripts, Copy/Paste from one sheet to another, but Paste into first empty cell in specific column (B) 要使用Google Apps脚本将单元格文本和注释复制到另一个工作表? - To copy the cell text and the comments to another sheet using google apps script? 用于从源单元格中独立复制值的 Google 工作表脚本 - Google sheet script to copy a value indipendently from the source cell 将工作表复制到另一个电子表格[Google Apps脚本] - Copy sheet to another spreadsheet [Google Apps Script] 从一张纸到另一张纸的范围复制脚本,删除复制的范围并从第三张纸粘贴新公式 - Script for copy range from a sheet onto another, delete copied range and paste new formulas from a third sheet 如何使用 Google 脚本从 1 个 Google 工作表中复制特定值并粘贴到另一个工作表? - How can I copy specific values from 1 Google Sheet and paste to another Sheet using Google Script? 用于匹配和复制基于另一个相邻单元格的 Google 表格脚本 - Google sheet script to match and copy based from another adjacent cell Google Apps脚本:将单元格值复制到另一个工作表中,条件是要复制并放置该值 - Google Apps Script: Copy cell value to another sheet with condition to copy and position the value Google Sheets 将行复制并粘贴到另一个工作表中,然后从第一个工作表中删除内容 - Google Sheets copy and paste row into another sheet and then delete content from the first sheet
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM