Overview

EG2 api is an REST json api, which enable you to do the following:

  1. Get data from your Excel file.
  2. Update (=set) data in your Excel file.

Changes array

Here you can set any change you would like to apply on the Excel file.

  • The field type is suggested, but not required. You can use one of these options for type: “number”, “text”, “date”, “time”,“datetime”, “boolean”.
  • Date must be formatted like this “YYYY-mm-DD”, or with time like this “YYYY-mm-DD HH:MM:SS”.
  • Time must be formmated like this “HH:MM:SS”.
{
	"worksheetName": "Your Worksheet",
	"cellOrRange": "b14",
	"value": "1.23",
	"type": "number"
}

Get array

Here you can specify which cells you want to get.

  • The values will be returned inside "Values" array in the response.
  • The field type is suggested, but not required. (see the options for this field here).
  • By default dates and time returned as number, like you see them in Excel if you don’t format these cells. If you want to get it as a date string, you can specify a "type" and you will get date time ISO string.
    • "type":"datetime" - will return a date formatted YYYY-mm-DDTHH:MM:SS
    • "type":"date" - will return a date formatted YYYY-mm-DD
    • "type":"time" - will return a date formatted HH:MM:SS
  • By default, all values will return as strings, means, wrapped with double quotes ("value": "some value"), but you can control it, if you add "type":
    • "type":"boolean" - will return a true/false.
    • "type":"number" - will return a number.

Request example

...
...
"get": [
         {
            "worksheetName": "Old",
            "cellOrRange": "b10"
        }, 
		{
            "worksheetName": "Old",
            "cellOrRange": "b14",
            "type":"datetime"
        }
]
...
...