-1

I started learning python to address this very issue(only having HTML experience previously). We backup our sheets to sharepoint. The problem we came across with backing up is that smartsheet just drops all the images into a single zip file and there isn't a way to know what row they originally went to. Therefore programming some thing to download separately with row names or modify the images in place and adding the row name.

I've managed to access the API and download the images but, I can't get the row numbers be on the image files.

1 Answers1

0

Modifying the attachment inside Smartsheet to make backups easier probably isn't the best solution. Rows can get moved around, or a multitude of other things can occur that would make relying on the filename to provide the row number problematic.

When you're getting the attachment information, there is a parameter in the data called parentId that is the unique id for that row. You should use the row id, rather than the row number. Then, when you download the attachment, you can set the local file name to include the row id from that information.

Software2
  • 2,358
  • 1
  • 18
  • 28
  • how can i show the the relationship bet the parentId and the row id? – Coeus_Tech Aug 17 '17 at 17:05
  • The `parentId` -is- the row id, provided the `parentType` is `ROW`. [See the documentation for details](https://smartsheet-platform.github.io/api-docs/#attachment-object). – Software2 Aug 17 '17 at 17:29