Office.initialize = function () {
    // Office is ready
    $(document).ready(function () {
        Excel.run(function (ctx) {

            // Create a proxy object for the sheet
            var sheet = ctx.workbook.worksheets.getActiveWorksheet();
            // Values to be updated
            var values = [
                ["Type", "Estimate"],
                ["Transportation", 1670]
            ];
            // Create a proxy object for the range
            var range = sheet.getRange("A1:B2");

            // Assign array value to the proxy object's values property.
            range.values = values;

            // Queue a command to load the text property for the proxy range object.
            range.load('text');

            // Synchronizes the state between JavaScript proxy objects and real objects in Excel by executing instructions queued on the context
            return ctx.sync().then(function () {
                console.log("Done");
            });
        }).catch(function (error) {
            console.log("Error: " + error);
            if (error instanceof OfficeExtension.Error) {
                console.log("Debug info: " + JSON.stringify(error.debugInfo));
            }
        });
    });
};