This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function launch_show_form(){ | |
/*Jade.listing:{"name":"Show invoice form","description":"Displays a form to manage the invoice example."}*/ | |
show_form() | |
} | |
function fetch_json(params){ | |
if(!params.on_fail){params.on_fail=fetch_failed} | |
fetch(params.url) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function auto_exec(){ | |
Jade.add_library("https://cdnjs.cloudflare.com/ajax/libs/yamljs/0.3.0/yaml.min.js") | |
const html=[] | |
html.push('<button onclick="showRangeForm()">Range Tools</button> ') | |
html.push('<button onclick="showRangeForm()">Task Tools</button> ') | |
Jade.open_canvas("Index", html.join("")) | |
} | |
//change and it is changed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function auto_exec(){ | |
const data=[ | |
{action:"Excel.run(save_as_tsv)", | |
name:"Save as TSV", | |
description:"Saves the data on the active sheet as a tab-seaparated-varible file"} | |
] | |
Jade.open_automations(true, "Automations", data) | |
} | |
async function save_as_tsv(excel){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function auto_exec(){ | |
Jade.open_automations(true, "Automations", [ | |
{action:"Excel.run(make_pdf)", | |
name:"Make a PDF", | |
description:"Builds and downloads a PDF file"} | |
]) | |
Jade.add_library('https://cdn.jsdelivr.net/npm/pdfmake@latest/build/pdfmake.min.js') | |
Jade.add_library('https://cdn.jsdelivr.net/npm/pdfmake@latest/build/vfs_fonts.min.js') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function airtable_query(){ | |
await jade.use("airtable_tools") | |
// infomration about where to place data | |
const sheet_name="MEMBER2" | |
const address="b2" | |
const token="YOUR API KEY GOES HERE"//https://airtable.com/account | |
const base_id= "appACNRk6PmArvtj1" | |
const table="member" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jade.use("excel_tools") | |
class dw_tools{ | |
static async query(query, id, owner, token, sheet_name, address){ | |
const url=`https://api.data.world/v0/sql/${owner}/${id}` | |
const options={ | |
headers: { | |
'Content-Type' : 'application/json', | |
'Authorization': 'Bearer ' + token, | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jade.use("excel_tools") | |
class airtable_tools{ | |
static async query(base_id, table, token, fields, filter_formula, sheet_name, address){ | |
const data=await airtable_tools.get_airtable_data(base_id, token, table, filter_formula,fields) | |
if(!fields){ | |
fields=[] | |
//fields were not specified so we must scan all the data to find the complete set of fields |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class excel_tools{ | |
static async array_to_table(sheet_name, address, range_data){ | |
const start_row = excel_tools.row_from_address(address) | |
const start_col = excel_tools.column_from_address(address) | |
await Excel.run(async function(excel){ | |
var sheet = excel.workbook.worksheets.getItemOrNullObject(sheet_name); | |
await excel.sync() | |
if (sheet.isNullObject) { | |
sheet = excel.workbook.worksheets.add(sheet_name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function dw_query(){ | |
await jade.use("dw_tools") | |
// specify the query | |
const query='select * from episode limit 3' | |
// information to access the right data set | |
const token="YOUR READ/WRITE TOKEN GOES HERE" | |
const id='simpsons' | |
const owner='atlas-query' |
OlderNewer