回答

4

由于您尚未指定环境/语言。我认为最简单的方法是使用Apps Script,因为它内置在Google Spreadsheets中。

这里是一个示例代码,这是否:

function myFunction() { 
    var ss = SpreadsheetApp.getActiveSpreadsheet(); 
    var sheet = ss.getSheetByName('SheetName'); 
    sheet.copyTo(ss).setName('NewName'); //copy to the same spreadsheet. 
    //get a different spreadsheet (you can get its id in the url) 
    var os = SpreadsheetApp.openById('any-spreadsheet-key-that-you-can-edit'); 
    //copy sourceSheet from one spreadsheet to another 
    sheet.copyTo(os).setName('AnotherName'); 
} 

要运行它,只需打开你要复制,点击菜单工具>脚本编辑器...粘贴代码,保存图纸电子表格并运行> myFunction

+0

谢谢你。我找不到通过C#中的Google Spreadsheets API在电子表格之间移动工作表的方法。我不得不实施一个Apps脚本,并使用远程执行API来运行它。这不是超快(5-10秒),但它的工作原理。 –

相关问题