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

PropertyValue
MethodPOST
Request URLhttps://{api.office-integrator_domain}/sheet/officeapi/v1/spreadsheet/convert
Content-Typemultipart/form-data

Parameters

Request Parameters

ParameterData TypeMandatory / OptionalDescription
apikey423s*****MandatoryUniquely identifies the web application which initiates the spreadsheet conversion request.
document or urlFile or StringMandatoryMethod 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>
}
Mandatoryformat -> 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

ParameterTypeMandatory / OptionalPossible ValuesDefault Value
formatStringMandatoryxlsx / xls / csv / tsv / ods / html / pdfxlsx
document_nameStringMandatoryNANA

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"}'

Sample Response

The converted spreadsheet will be downloaded as bytes.