Getting Source as "sheet" for every sheet.

I have created sheet from template. While calling sheetList api I have included source for getting source of that sheet. But for every sheet I am getting "Sheet" as source. If I created sheet from template or report, it should return source as Template or Report.

Could you please let me know How to get source of every sheet?

Best Answer

Answers

  • Genevieve P.
    Genevieve P. Employee Admin

    Hi @mukund waghmode

    You're right - if the sheet was created from a Template the source for that sheet ID should say "Template". Could you maybe provide screen captures of exactly how you are creating these sheets? If you used a template from our Solution Center can you specify which one was the source?

    Saving a new copy from a sheet would have the source as a "Sheet"... even if this original sheet was downloaded from our Solution Center, some of these may actually be sheets and not a "Template" type of sheet.

  • Hello,

    I have created sheet by selecting from IT templates. Inside that clicked on 'IT Office Relocation Plan' and just edited that template and saved. After calling api I got response as below.

    {

    "source": {

    "id": 3145375327512452,

    "type": "sheet"

    },

    "id": 3554152732223364,

    "name": "IT Office Relocation Plan",

    "version": 1,

    "accessLevel": "OWNER",

    "permalink": "https://app.smartsheet.com/sheets/9cx34HQCC3vP96FpCQv6ffGG6R86F9Vc58QjmhJ1",

    "createdAt": "2020-03-14T14:59:26Z",

    "modifiedAt": "2020-03-14T15:00:22Z"

    }

    Please let me know is this right way Or am I messed anything?

  • Genevieve P.
    Genevieve P. Employee Admin

    Hi @mukund waghmode

    I took a look at the "IT Office Relocation Plan" from our Solution Center and I can confirm that this is technically a sheet. Although it says Template within the Solution Center, once this is downloaded into your account it is just a regular sheet (with pre-filled information & set-up).

    To test the request with a sheet made from a template, you can create your own template by using File > Save as Template. This creates a new type of file, a template file, that cannot be edited or adjusted.

    From this new template file, create a sheet. Then try your same API request and look at what the source says.

    Let me know if you have questions about this!

    Cheers,

    Genevieve

  • As per your suggestion,

    Created new template, saved it as template. got message as "template saved".

    After created new sheet from that template and called api. Still getting source as "Sheet".

    {

    "source": {

    "id": 4503604829677444,

    "type": "sheet"

    },

    "id": 1601574700115844,

    "name": "from template1",

    "version": 1,

    "accessLevel": "OWNER",

    "permalink": "https://app.smartsheet.com/sheets/F5rXh5j9MgJRwch5c2JFw4jcR8449cgCqPcRf2R1",

    "createdAt": "2020-03-17T07:28:02Z",

    "modifiedAt": "2020-03-17T07:28:02Z"

    }

  • Thanks @Tim Wells , these steps works for me.