CalcTree Help Pages
  • What is CalcTree?
  • Getting started
    • CalcTree Pages
    • Create a CalcTree Page
    • Add a calculation
    • Collaborate with a colleague
  • Calculations
    • Parameters
      • Math formulas
        • Parameter Data Types
        • Native Functions
          • Arithmetic Functions
          • Trigonometric Functions
          • Logical & Comparison Functions
          • Matrix & Vector Functions
          • Probability & Combinatorics Functions
          • Statistical Functions
          • String Functions
          • Utility Functions
          • Other Native Functions
        • Valid Expression Syntax
      • Supported Units
      • Dropdown List Parameters
        • Linking CSV Data to Dependent Dropdowns in CalcTree
      • Parameter Settings
    • Integrations
      • Python in CalcTree
        • Adding a Python Source
        • Defining Parameters in Python
        • Referencing Other Parameters in Python
        • Working with Units in Python
        • Creating Tables and Visuals in Python
        • Consuming Files in Python
        • Using Pre-installed Python Libraries
      • Spreadsheets [Coming Soon!]
      • File Upload
        • CSV files
      • 3rd Party Software Plugins
        • Excel
        • Grasshopper
        • ETABS [v20 & v21]
        • ETABS [v22]
        • SAP 2000
        • CSI Bridge [v26]
    • Templates [Coming Soon!]
    • Optimising your calculations
  • Pages & Reports
    • CalcTree Documents
    • Static content
    • Parametric content
      • Parametric equation
      • Inputs
      • Outputs
  • Export to PDF
  • API
    • GraphQL API
      • Generating an API key
      • Queries
        • GetCalculation
        • Calculate
      • Examples
        • Bulk calculations with Python
  • Collaborate
    • Add members
    • Review and approval
    • Add stakeholders
  • Administrate
    • CalcTree Workspace
    • Versioning and Audit trail
  • CalcTree for System Administrators
Powered by GitBook
On this page
  • Create a spreadsheet source
  • Defining spreadsheet parameters
  • Editing the spreadsheet source
  • Defining a spreadsheet input
  • Defining a spreadsheet grid of inputs and outputs
  • Spreadsheet charts
  • Linking spreadsheets to other sources
  1. Calculations
  2. Integrations

Spreadsheets [Coming Soon!]

Create calculations based on spreadsheets

PreviousUsing Pre-installed Python LibrariesNextFile Upload

Last updated 4 months ago

CalcTree provides spreadsheets as a calculation option. You can add any spreadsheet that follows the Office Open XML standard to a CalcTree page as a source.

Spreadsheets with .xlsx file extensions are based on Office Open XML (OOXML) standard and hence can be used as a source in CalcTree

On this page you will learn to create calculations based on spreadsheets. To learn more about creating parametric content based on these calculations, continue on Parametric content

Create a spreadsheet source

From the right-hand panel, click on Spreadsheet. A dialogue appears that allows you to select an .xlsx spreadsheet file to upload. Use the below spreadsheet as a sample. The spreadsheet gets uploaded and added as a source to current page. The spreadsheet viewer will slide in from the bottom of the view, showing the spreadsheet source:

The spreadsheet viewer is a read-only viewer that allows you to navigate between sheets inside the spreadsheet and define parameters and inputs for the spreadsheet source.

Use mouse scrolling wheel while holding the ctrl key (control key on Mac) to zoom in and out the spreadsheet.

Defining spreadsheet parameters

That was a single-value parameter. You can also create a table parameter by selecting a range and then clicking on the plus button. As an example, select the B2:C3 range and then click on the plus circle. A table parameter called ct_table_1 will appear on the right-hand panel which gets calculated by the cells in the B2:C3 range:

Editing the spreadsheet source

Open the spreadsheet and edit cell C2 from 3 to 4. Now click on the + Add button on the right hand-side panel and select Spreadsheet. Browse to the edited spreadsheet on your computer and select it for upload - make sure the file has the same name as before so that it will replace the existing source. Note that the calculated value for the spreadsheet parameters get updated on the right-hand-side.

If you upload a spreadsheet with the same file name as an existing spreadsheet source, it will replace the existing spreadsheet. The parameter definitions will remain pointing to the same addresses.

Defining a spreadsheet input

If a spreadsheet cell has no formula in it (such as numeric value like 2), clicking on the plus icon will create a spreadsheet input. On the other hand, if the spreadsheet cell has a formula (such as = C2 + C3 ) clicking on the plus icon will create a spreadsheet parameter.

Clicking on the plus icon when a range of cells is selected, will always create a tabular parameter, not an input.

Defining a spreadsheet grid of inputs and outputs

Coming soon!

Spreadsheet charts

If the spreadsheet includes charts, CalcTree will extract them as dynamic figures under the spreadsheet source. As an example, add the below sample spreadsheet with charts to a CalcTree page and create an input from cell B3 . Now change the input value shet_b3 and inspect how the figure dynamically updates under the source on the right-hand-side:

You can use spreadsheet charts as parametric elements on the document. To learn more continue on Parametric content

Linking spreadsheets to other sources

Coming soon!

You can link multiple sources to create more complex calculations. That means a source picks up a result from another source and does more calculations on it.

In order to link a spreadsheet to other calculations, it needs to refer to the value of another source's parameters. That is achievable by typing the other source's parameter name inside a spreadsheet input. For example, if you have two parameters called width, and height which are defined by other sources, you can refer to them in inputs sheet1_c2 and sheet1_c5 :

After adding the as a source, click on cell C5 to select it. A green circle with a plus sign appears inside the cell. Click on the circle to define a parameter calculated by that cell's formula. A parameter named sheet1_c5 will appear on the right-hand panel which gets the calculated value of cell C5's formula:

Unlike Python sources, you can't edit the spreadsheet source inside CalcTree. However, you can make edits to a spreadsheet file offline, and re-upload it. As an example, after adding the source, you can download it from under the Uploaded Files section on the right-hand-side panel, by clicking on Download command from its three-dot menu:

You won't need to re-upload an edited spreadsheet for inputting different values of cells. By , you can provide input values to spreadsheet sources, without opening the source.

In order to use the spreadsheet as a calculation source, it will be convenient to provide input values to it without editing it. To achieve that you can define spreadsheet inputs. As an example, after adding the as a source, select cell C2 and click on the green plus icon. A spreadsheet input called sheet1_c2 will appear on the right-hand-side. This input initially has the current value from cell C2, but you can enter a new value for it, which will be sent to the spreadsheet as the new value for cell C2.

Defining a spreadsheet grid of inputs and outputs are among next items on our roadmap. Please follow our product roadmap items and status and let us know what you think!

Linking spreadsheets to other sources is among next items on our roadmap. We plan to enable it as explained below. Please follow our product roadmap items and status and let us know what you think!

here
here
sample spreadsheet
sample spreadsheet
defining inputs for the spreadsheet
sample spreadsheet
9KB
Sample spreadsheet.xlsx