Python API Copy Sheet - Data not copying to new sheet

I am copying a sheet (source) to a new sheet (destination) using Smartsheet's SDK API. The copy of an empty sheet is the result. I tried the include parameter but it makes no difference. Does anyone know the correct syntax to use so when I copy a sheet the data within is copied to the destination sheet as well?
Here's SMartsheet's SDK Python example:
response = smartsheet_client.Sheets.copy_sheet( 4583173393803140, # sheet_id smartsheet.models.ContainerDestination({ 'destination_type': 'folder', # folder, workspace, or home 'destination_id': 9283173393803140, # folder_id 'new_name': 'newSheetName' }) )
Here's my script with the include parameter:
#!/usr/bin/python3.8
import smartsheet
smart = smartsheet.Smartsheet()
response = smart.Sheets.copy_sheet(
7134853598236548, # sheet_id
smart.models.ContainerDestination({
'destination_type': 'folder', # folder, workspace, or home
'destination_id': 8269922569611140, # folder_id
'new_name': 'newSheetName',
'include': 'data'
})
)
Thank you!
Best Answer
-
I figured it out. Its found in this article https://stackoverflow.com/questions/51479985/copy-a-sheet-in-smartsheet-using-python-api
Answers
-
I figured it out. Its found in this article https://stackoverflow.com/questions/51479985/copy-a-sheet-in-smartsheet-using-python-api
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 66.2K Get Help
- 431 Global Discussions
- 152 Industry Talk
- 490 Announcements
- 5.2K Ideas & Feature Requests
- 85 Brandfolder
- 155 Just for fun
- 74 Community Job Board
- 501 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 306 Events
- 36 Webinars
- 7.3K Forum Archives