Lesson 1 of 8
Create an API based application
Create a published SpreadsheetWeb API application by identifying spreadsheet inputs and outputs, uploading the workbook, and publishing the API.
2 min readTurn an existing Excel calculation model into a callable API without rebuilding its formulas in another programming language. This lesson follows a term-life insurance calculator, but the same process applies to pricing models, financial calculations, engineering tools, and other spreadsheet-based logic.
Prepare the Excel calculation model
A SpreadsheetWeb API application needs a clear set of values to receive and return:
- Inputs are the values supplied by the calling application, such as a customer name, state, plan type, age, or coverage amount.
- Outputs are the calculated values returned by the API, such as the total insurance premium in the example workbook.
- Calculation logic can remain in formulas, lookup tables, supporting worksheets, and other structures already present in the workbook.
The workbook does not need to follow a special worksheet layout. SpreadsheetWeb can work with the model as long as the required inputs and outputs can be referenced.
Named ranges make those references easier to understand and maintain, but they are not required. You can expose individual cells through single-cell named ranges or group several related values in a multi-cell named range. A multi-cell range can represent a complete input or output block in one reference.
Create the API application
- Sign in to your SpreadsheetWeb Hub account and create a new application.
- Upload or drag the prepared Excel workbook into the application wizard.
- Choose the application type without a user interface: the web service or API option.
- When prompted to open API Toolkit immediately, choose Not now if you want to finish publishing first.
- Open Design to review the application configuration.
- Publish the application.
Publishing is required before an external system can call the API. The published application now exposes the workbook calculation engine as a web service while preserving the formulas and supporting data in the Excel model.
The next lessons use API Toolkit to choose the inputs and outputs, construct a request, and verify the calculation response.