Excellion - Read and Write Excel Files

FREEMIUM
By Lorenzo Sinisi | Updated 20 days ago | Data
Health Check

N/A

Followers: 0
Resources:
Product Website
API Creator:
Rapid account: Lorenzo Sinisi
Lorenzo Sinisi
lasslonet-MQTF54KYPya
Log In to Rate API
Rating: 5 - Votes: 1

README

How it works?

Excellion service that lets you manipulate Excel files via REST APIs.

It is a tool designed for developers where you can upload, write and read excel files on the fly.

There is only one API endpoint which is /api/changeset and it accepts the format form-data (as you can see in the example below).

If you get a 401 double-check the existence of all the cell numbers and sheet names.

On a very high level this is what happens when you make a call:

  1. HTTP call is initiated
  2. Payload: upload the file (under the name โ€œfileโ€) and changes + selects are specified
  3. The server will store a temporary copy of the file, write it, recalculate all formulas, read it again and return the result
  4. The file gets deleted from the server

Download the example file ๐Ÿ“„

Download this Excel file (does nothing but the sum of some cells, check it out): https://docs.google.com/spreadsheets/d/1WuVi7F1PDpH69JWRa9bDxTHT1JaA5w43/edit?usp=sharing&ouid=113909502023297765536&rtpof=true&sd=true

Test the APIs ๐Ÿ“„

Get the path of your downloaded file and replace both the TOKEN and the PATH of your file, then try to run this code:

curl --location --request POST 'RAPID_API_ENDPOINT' \
--form 'changes="[{\"cell\": \"A1\", \"sheet\": \"Sheet 1\", \"value\": 4}]"' \
--form 'select="[{\"cell\": \"A7\", \"sheet\": \"Sheet 1\"}]"' \
--form 'file=@"/Yourmachine/yourusername/change/this/excel-example.xlsx"' // download this from the instructions above

Change the Excel file columns ๐Ÿ“„

In order to change any column in the Excel file, you must know which Sheet you want to operate on, then you can describe the changes to your file in the following format:

[{"cell": CELL_NAME (i.e. A11), "sheet": SHEET_NAME (i.e. "Sheet 1"), "value": anything as long as it works in excel}]

Read the Excel file columns ๐Ÿ“„

The same exact format goes for the field โ€œselectโ€ of the form, you need to specify cell name and sheet (see the curl example above).

[{"cell": CELL_NAME (i.e. A11), "sheet": SHEET_NAME (i.e. "Sheet 1")}]

Example:

Download this Excel file (does nothing but the sum of some cells, check it out): https://docs.google.com/spreadsheets/d/1WuVi7F1PDpH69JWRa9bDxTHT1JaA5w43/edit?usp=sharing&ouid=113909502023297765536&rtpof=true&sd=true and place it under /Users/yourusername/Desktop/excel-example.xlsx

In the following example we are changing the cell A1 of the sheet โ€œSheet 1โ€ and setting the value to the number 4:

var axios = require('axios');
var FormData = require('form-data');
var fs = require('fs');
var data = new FormData();
data.append('changes', '[{"cell": "A1", "sheet": "Sheet 1", "value": 4}]'); // we want to change only this cell
data.append('select', '[{"cell": "A7", "sheet": "Sheet 1"}]'); // we want to read this value then
data.append('file', fs.createReadStream('/Users/yourusername/Desktop/excel-example.xlsx')); //