Conversion API
Purpose
Zoho Sheet's Conversion API lets you 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.
To convert a spreadsheet to any Sheet supported format (.csv, .tsv, .xls, .xlsx, .ods, .pdf etc.)
Quick Reference
| Property | Value |
|---|---|
| Method | POST |
| Request URL | https://{api.office-integrator_domain}/sheet/officeapi/v1/spreadsheet/convert |
| Content-Type | multipart/form-data |
Parameters
Request Parameters
| Parameter | Data Type | Mandatory / Optional | Description |
|---|---|---|---|
| apikey | 423s***** | Mandatory | Uniquely identifies the web application which initiates the spreadsheet conversion request. |
| document or url | File or String | Mandatory | 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> } | Mandatory | 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 | Mandatory / Optional | Possible Values | Default Value |
|---|---|---|---|---|
| format | String | Mandatory | xlsx / xls / csv / tsv / ods / html / pdf | xlsx |
| document_name | String | Mandatory | NA | NA |
Notes and Limits
- Users will get a response of the converted spreadsheet in the form of bytes.
- For a full list of error handling cases in Conversion API, refer to Error Codes.
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"}'