我试图用 python API 复制一张工作表,但每次我这样做时,它只包括格式(列名和行数),但我希望它包括数据。有什么办法可以做到这一点吗?我也用模板尝试过它,同样的事情发生它创建一个新工作表但它没有任何数据。
回答问题后编辑的代码:
inc_list = ['data'] # you can add other parameters here, separated by a comma
response = ss_client.Sheets.copy_sheet(
sheetID, # sheet_id
ss_client.models.ContainerDestination({
'destination_type': 'folder', # folder, workspace, or home
'destination_id': folderID, # folder_id
'new_name': cellValue,
}),
include=inc_list
)