[英]Automatic copy table to a new Sheet without formula (Google Sheets script)
有一張工作表,它由帶有公式的表組成。 如何僅將值(不帶公式)獲取到第二張工作表? 我需要自動應用該過程(無需手動復制粘貼)。
您可以嘗試使用copyTo()
。 默認情況下,值和格式都會被復制,但是可以使用高級參數來覆蓋它。
// The code below copies only the values of the first 5 columns over to the 6th column.
var sheet = SpreadsheetApp.getActiveSheet();
sheet.getRange("A:E").copyTo(sheet.getRange("F1"), {contentsOnly:true});
高級參數如下:
- formatOnly :指定僅應復制格式
- contentsOnly :指定僅應復制內容
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.