Zoho - Trademark
Blogs
  Forums  Sheet Home
  Toll Free : 888 900 9646

API Home >> Sheet >> API Reference >> upload



Upload new workbooks into Zoho Sheet.

 

Request URL: POST

                                XML : http://sheet.zoho.com/api/private/xml/uploadbook?apikey=[API Key]&ticket=[Ticket]

                                JSON : http://sheet.zoho.com/api/private/json/uploadbook?apikey=[API Key]&ticket=[Ticket]


Request parameters:

To upload new workbooks in Zoho Sheet we need to submit a form data to Zoho Sheet with the following fields:

Field
Description
content
Content of the file.
workbookName
[string] - Name to be given to this uploaded book will be derived from the file name, by defualt. Use this parameter if you wish to override the default name.
contentType [optional]
[string - (xls|sxc|csv)] -- contentType will be derived from the attached file name by default. Use this parameter, if you want to override this.


Sample Form (
POST Method)


<form method="POST"    action="http://sheet.zoho.com/api/private/xml/uploadbook?apikey=[APIKEY]&ticket=[Ticket]" enctype="multipart/form-data" target="_self">

File: <input type="file" name="content" size="38"> <br>

<input type="hidden" name="contentType" value="xls">

<input type="hidden" name="workbookName" value="[BookName value]">

<input type="submit" value="UploadBook" class="divbutton" name="submit">

</form>




Response fields


Field
Description
workbookId
Unique ID associated with the uploaded workbook.
workbookName
Name of the uploaded workbook.
createdTime
Number of milliseconds between the workbook created time and midnight, January 1, 1970 UTC.
updateLock
Advisory lock for update operation. Ensures that updates made to workbook are consistent.


Sample Response

The following is the sample XML response for the above method:


<?xml version="1.0" encoding="UTF-8" ?>
<response uri="/api/private/xml/uploadbook">
  <result>

     <workbookId>
15265000000006107</workbookId>
        <workbookName>MonthlySales</workbookName>
     <createdTime>1172137033182</createdTime>
     <updateLock>1180593219644</updateLock>

  </result>
</response>


Equivalent JSON response



{
  "response":
   {
        "uri": "/api/private/json/uploadbook",
        "result":
        {
   
            "
workbookId":"15265000000006107",
            "workbookName":"MonthlySales",
            "lastModifiedTime":1172137033182,
            "updateLock":"1180593219644"
        }
    }
} 



Errors


Uploading a new workbook method may return general & input errors.