Preview Spreadsheet

Purpose 

To open a spreadsheet in preview or read-only mode in Zoho Sheet.

HTTP Request URL

https://{api.office-integrator_domain}/sheet/officeapi/v1/spreadsheet/preview

Request Parameters

ParameterData TypeDescription
Mandatory Parameters
apikey423s*****Uniquely identifies the web application in which the Sheet editor is integrated.
document

or

url
File

or

String
Method of providing the input file depending on its location.

document - if the input file is from your local drive or desktop.

url - if the input file is from a publicly accessible Web URL.
Optional Parameters
languageStringEnables the editor interface to open in Sheet supported languages.
Default value: en (English)
permissions{
 "document.export":true,
 "document.print":true,
}

Define spreadsheet permissions for user. Option to allow or revoke spreadsheet "Export" and "Print" access.

 

Preview Spreadsheet - Error Codes

CodeDescription
2505Sorry! This spreadsheet exceeds the permitted limit of 256 columns per worksheet
2840Unable to import.
2841Unable to import from URL.
2851No such spreadsheet.

For a full list of error handling cases in Preview Spreadsheet, refer here.

Sample Request

Copiedcurl --request POST \
  --url 'https://api.office-integrator.com/sheet/officeapi/v1/spreadsheet/preview' \
  --header 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
  --form document=@/Users/username/Spreadsheet/Sample.xlsx \
  --form 'apikey=423s*****' \
  --form language=en

Sample Response

Copied{
    "gridview_url": "https://api.office-integrator.com/sheet/officeapi/v1/0b668aebde0eea98aea90ba9f509a92938d58f96d16293501ce71e2a263ff1c974dc2caa9c51a39e49a3fefcdd9f9da2172aa98ef7ca0678761bcbc616cfb515?zview=rgrid",
    "session_delete_url": "https://api.office-integrator.com/sheet/officeapi/v1/session/e087cd60acabf8d3182d15ad60e7b0ac96a272e4abfcfd424198e34c4e219f2b83cf3074a7629699a902423d19d6e9d5",
    "preview_url": "https://sheet.zoho.com/sheet/officeapi/v1/0b668aebde0eea98aea90ba9f509a92938d58f96d16293501ce71e2a263ff1c974dc2caa9c51a39e49a3fefcdd9f9da2172aa98ef7ca0678761bcbc616cfb515",
    "session_id": "e087cd60acabf8d3182d15ad60e7b0ac96a272e4abfcfd424198e34c4e219f2b83cf3074a7629699a902423d19d6e9d5",
    "document_delete_url": "https://api.office-integrator.com/sheet/officeapi/v1/spreadsheet/b2aec52e022bbf3124f9272ff6143492c2a20429ab34f5ba7abb1a4c622d458573cb7329a8c634c4dd128f32fb37ed82",
    "document_id": "b2aec52e022bbf3124f9272ff6143492c2a20429ab34f5ba7abb1a4c622d458573cb7329a8c634c4dd128f32fb37ed82"
}