Conversion API
Zoho Sheet’s Conversion API lets you to easily integrate the sheet conversion functionality to web applications and its powerful tools. The Conversion API allows you to convert a file from one format to another.
Apart from supporting popular file formats like .xlsx and .xls, Zoho Sheet is also compatible with .ods, .csv and .tsv during import. The files can be converted to the following formats during export: .csv, .tsv, .xls, .xlsx, .ods, .html and .pdf.
Purpose
To convert a spreadsheet to any Sheet supported format (.csv, .tsv, .xls, .xlsx, .ods, .pdf etc.)
HTTP Request URL
https://{api.office-integrator_domain}/sheet/officeapi/v1/spreadsheet/convert
Request Parameters
Parameter | Data Type | Description |
Mandatory Parameters | ||
apikey | 423s***** | Uniquely identifies the web application which initiates the spreadsheet conversion request. |
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. |
output_options | { "format": <String>, "document_name": <String>, } |
format -> Specify the output format in which the converted file needs to be stored. document_name -> Specify the name for the converted spreadsheet.
|
Note:
Users will get a response of the converted spreadsheet in the form of bytes.
output_options
Parameter | Type | Possible Values | Default Value |
Mandatory Parameters | |||
format | String | xlsx / xls / csv / tsv / ods / html / pdf | xlsx |
document_name | String | NA | NA |
For a full list of error handling cases in Conversion API, refer here.
Sample Request
Copiedcurl -X POST \
'https://api.office-integrator.com/sheet/officeapi/v1/spreadsheet/convert?apikey=423s*****' \
- H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
- F 'document=@/Users/username/Documents/Sample.xlsx' \
- F 'output_options={"format":"xlsx","document_name":"New"}'