Global

Members

FileSystem

Emulates VBA File System
Source:
To Do:
  • separate out workbook APIs from FileSystem APIs
  • implement current_directory

TestFramework

Custom Test Framework This is a custom test framework made to run simple test cases. This supports basic assertions and logs a well formatted report.
Source:
To Do:
  • Better Error Reporting

USE_FILEMAPPER_MOCKER

Flag variable to toggle using FileMapper mocker
Source:

VBAFileMapperMocker

Mocks the FileMapper module. To be replaced with complete implementation. The mocker has a map of hardcoded file path to google drive file id mappings.
Source:

Methods

api_workbook_open(path)

For Testing only. Open spreadsheet in a new tab.
Source:
Parameters:
Name Type Description
path string The local file path in the Excel file

api_workbook_open_(path) → {Spreadsheet}

Emulates workbook.Open(filename) API Opens the corresponding spreadsheet in a new tab.
Source:
Parameters:
Name Type Description
path string The local file path in the Excel file
Returns:
Type:
Spreadsheet
The spreadsheet object of the path

doGet(e)

HTML Test Report Generation Handler
Source:
Parameters:
Name Type Description
e object The event parameter for a simple get trigger.

onInstall(e)

Runs when the add-on is installed. This method is only used by the regular add-on, and is never called by the mobile add-on version.
Source:
Parameters:
Name Type Description
e object The event parameter for a simple onInstall trigger. To determine which authorization mode (ScriptApp.AuthMode) the trigger is running in, inspect e.authMode. (In practice, onInstall triggers always run in AuthMode.FULL, but onOpen triggers may be AuthMode.LIMITED or AuthMode.NONE.)

onOpen(e)

Creates a menu entry in the Google Docs UI when the document is opened. This method is only used by the regular add-on, and is never called by the mobile add-on version.
Source:
Parameters:
Name Type Description
e object The event parameter for a simple onOpen trigger. To determine which authorization mode (ScriptApp.AuthMode) the trigger is running in, inspect e.authMode.

openURL(url, message)

Utility function to open URL in a new tab
Source:
Parameters:
Name Type Description
url string The url to be opened
message string The message to be displayed in a dialog box

showSidebar()

Opens a sidebar in the documen-t containing the add-on's user interface. This method is only used by the regular add-on, and is never called by the mobile add-on version.
Source:

workbook_run_all_tests()

Unit Tests Tests for Workbook are written using custom TestFramework because QUnit doesn't support bounded scripts
Source: