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

API Home >> Sheet >> API Reference >> content



Get the public content of a range of sheet with sheet index.

 

Request URL :

        XML : http://sheet.zoho.com/api/public/xml/content/[BookID]/[sheet index]/[range]?apikey=[API Key]

       JSON : http://sheet.zoho.com/api/public/json/content/[BookID]/[sheet index]/[range]?apikey=[API Key]

-- Range for example can be a cell range [A1:C10], a cell [A1], an entire column [A], an entire row [1], columns A through D [A:D], rows 2 to 7 [2:5].

-- R1C1 range format will be supported later. Moreover getting content of shared workbook is not support as of now.


Response fields

Field
Description
range
Gets the content of a particular range with the specified sheet index. [range] can be A1:C10(a cell range) , A1(a cell), A(an entire column), 1(an entire row), A:C(columns A through C), 2:5(rows 2 to 5).
row
Identifies a particular row with the index number and subsequent cell values in that row.
cell
Gets content of each cell specific to each cell index. Other parameter may include dataType, value, formula etc.


Sample Response

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


<?xml version="1.0" encoding="UTF-8" ?>
<response uri="/api/public/xml/content/15265000000006057/2/6:9">
  <result>

    <range rows="4" cols="5">
         <row index="1">
        <cell index="2" dataType="string">Color Converter - RGB to Hex</cell>
      </row>
      <row index="3">
        <cell index="3" dataType="string">Number</cell>
        <cell index="4" dataType="string">Float</cell>
        <cell index="5" dataType="string">Hexadecimal</cell>
      </row>
      <row index="4">
        <cell index="2" dataType="string">Red</cell>
        <cell index="3" dataType="float" value="235">235</cell>
        <cell index="4" formula="=C9/255" dataType="float" value="0.92156862">0.92</cell>
        <cell index="5" formula="=DEC2HEX(C9)" dataType="string">EB</cell>
      </row>
    </range>

  </result>
</response>


Equivalent JSON response



{
  "response":
   {
        "uri": "/api/public/json/content/15265000000006057/2/6:9",
        "result":
        {
           "range":
           [
              {
                  "rows":"4",
                  "cols":"5",
                        
                 
"row":
                       

                  [
                    {
"index":"1",
                    
"cell":
                      [{"index":"2","dataType":"string","_content":"Color Converter - RGB to Hex"}]
                     },
                       
 
                        {"index":"3",
                         
"cell":
                          [
                           {
"index":"3","dataType":"string","_content":"Number"},
                           {"index":"4","dataType":"string","_content":"Float"},
                           {"index":"5","dataType":"string","_content":"Hexadecimal"}
                          ]
                         },
                        
                         {
"index":"4",
                         
"cell":
                          [
                           {
"index":"2","dataType":"string","_content":"Red"},
                           {"index":"3","dataType":"float",value="235", "_content":"235"},
                           {"index":"4","formula":"=C9/255","dataType":"float",value="0.92", "_content":"0.92"},
                           {"index":"5","formula":"=DEC2HEX(C9)","dataType":"string", "_content":"EB"}
                          ]
                         }
                    ]
                 }
           
]
          }
    }
}  
 



Errors


Displaying content of a sheet range with a specific sheet index may return general error with HTTP error code of 2851.