Get cell history of all the rows in a column


This is a very urgent requirement I received from my team. They want the history of all cells in a column. I've spent quite a few hours exploring Smartsheet forums. However, the only solution I found was by adding the ID of each row and column individually via API to get the cell history of that particular cell. I want to implement this for 4000 rows, is there a better way of doing it?

Could you please help? Thank you!


  • Lucas Rayala
    Lucas Rayala ✭✭✭✭✭✭

    Hi @ahumne25, you use code to get all the row IDs from your sheet and then use that output to grab all the cell histories. You iterate through all the rows to get the IDs, batch the IDs into a list and then use the list to grab the cell histories. You need to have your code batch the requests by about 300 rows or the request won't go through. It will take the code about 2 minutes to run, I do something similar. Do you have anyone who can run the code?

  • Thank you for the prompt response Lucas. Unfortunately I do not have anyone who can write the code.

    However, I can try this out myself. Would you know if there are any articles written on the solution you proposed?

    The example on Smartsheet API doc is for just 1 cell at a time.

  • Lucas Rayala
    Lucas Rayala ✭✭✭✭✭✭
    edited 03/07/23

    @ahumne25 -- this isn't trivial if you're just getting started. It will take you some time (potentially days) to get everything set up.

    First, make sure you can access an API token -- go to your account icon in the lower left corner, select Personal Settings, then API Access. If you have the ability to click and generate a new API access token, then you have the correct plan type to move forward. Otherwise you do not.

    If you have the correct plan type, then you need to get Python up and running on your system. If you are in a company, you may need to check with your IT department about using and accessing Python, and you may need to work through your companies proxy server. Then, you can Google "getting started with Python and Visual Studio" on YouTube -- expect a bit of work. Get back to me with an @mention if you get this all going. I can provide some code to get you moving.