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
- Smartsheet Customer Resources
- 64.2K Get Help
- 419 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 142 Just for fun
- 58 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 299 Events
- 38 Webinars
- 7.3K Forum Archives