How to use the Excel Online API using JavaScript.
There are two ways to do this:
npm install sheet2api-js
const Sheet2API = require('sheet2api-js')
const client = new Sheet2API('https://sheet2api.com/v1/FgI6zV8qT121/characters/')
client.read().then(function(data) {
console.log(data)
})
Here are some ready to use Excel Online API examples using the JavaScript client. Simply copy them into your project and you're good to go.
// Returns all rows from the first Sheet.
const Sheet2API = require('sheet2api-js')
const client = new Sheet2API('https://sheet2api.com/v1/FgI6zV8qT121/characters/')
client.read().then(function(data) {
console.log(data)
})
// Returns all rows from the first Sheet, filtered by search terms.
const Sheet2API = require('sheet2api-js')
const client = new Sheet2API('https://sheet2api.com/v1/FgI6zV8qT121/characters/')
client.read({
search: { name: 'Bugs Bunny' }
}).then(function(data) {
console.log(data)
})
// Adds a new row to the Sheet.
const Sheet2API = require('sheet2api-js')
const client = new Sheet2API('https://sheet2api.com/v1/FgI6zV8qT121/characters/')
client.write({
name: 'Bugs Bunny',
'favourite thing': 'Carrots',
image: 'Bugs.png'
}).then(function(data) {
console.log(data)
})
For more in-depth examples check out the Github code repository.
check_circle It's as easy as that! 🎉
Need help? Feel free to reach out via our contact page.
Be up & running in seconds.
Try for FREE