JavaScript examples

These examples use the Investment Growth Calculator SureSheet.

Simple example

(async () => {
    const workbookId = "abc7cbef-2491-4787-94f8-6542fab12a4e";
    const simulateUrl = `https://www.equalto.com/suresheet/api/v1/simulate/${workbookId}`;
    const response = await fetch(simulateUrl, {
        method: 'POST',
        body: JSON.stringify({
            inputs: {
                Sheet1: {
                    C6: 25000,
                },
            },
            outputs: {
              Sheet1: ['C13'],
            },
        }),
        headers: {
            'Content-Type': 'application/json',
        },
    });
    const responseJson = await response.json();
    console.log(responseJson)
})();

Should print:

Advanced example with ranges

Should print:

Last updated