@cryptosheet/sheet

Utility functions to interact with Google Spreadsheets

Usage no npm install needed!

<script type="module">
  import cryptosheetSheet from 'https://cdn.skypack.dev/@cryptosheet/sheet';
</script>

README

@cryptosheet/sheet

Utility functions to interact with Google Spreadsheets

Usage

const {toSheetRows, sheetFor} = require('@cryptosheet/sheet')

const columns = ['createdAt', 'exchange', 'currencyPair', 'balance']
const accounts = [{
  createdAt: '...',
  exchange: 'coinbase',
  currencyPair: 'ltc-eur',
  balance: 0.123
}]

const rows = toSheetRows(accounts, columns)
const {
  clearSpreadsheetValues,
  getSpreadsheetValues,
  getSpreadsheet,
  updateSpreadsheetValues
} = sheetFor(`ACCOUNTS!A:${endColumn}`, config)

updateSpreadsheetValues(rows).then(() => log('updated sheet'))