Basic usage
A Lansky file is an Excel workbook that must contain at least two mandatory sheets, the input sheet and the output sheet.
Input sheet
input sheet – This sheet defines the data that will be injected into the calculation engine.
- Column A: The data path, for example
car.catalog_price. - Column B: The value injected by the Lansky engine during execution.
- Column C: The default value to use if the injected data is
undefinedornull.
This structure allows the engine to dynamically fill input values based on the context of the flow while maintaining safe defaults.
Output sheet
output sheet – This sheet defines the structure of the JSON object that the Lansky engine will generate as output.
Each cell’s position determines the hierarchy of keys in the final JSON. For example:
| A | B | C |
|---|---|---|
| car_computations | total_car_price | 5000 |
will produce the JSON:
{
"car_computations": {
"total_car_price": 5000
}
}
The formula of the cell C1 is =input!B1+input!B2
So it takes the value of the cell B1 from the input sheet and the value of the cell B2 from the input sheet and adds them together, to compute the total car price.
Between these two sheets, all the power of Excel can be leveraged — formulas, references, and calculations — to transform input data into meaningful business outputs.
The Lansky engine interprets these Excel-based rules, evaluates the formulas, and assembles the resulting structured JSON output accordingly.
Output structure options
The output sheet offers two ways to define the resulting JSON structure:
1. Using full paths in a single column
You can define the entire attribute path in column A, and place the value in column B.
Lansky will automatically interpret the nested structure from the dot notation.
| A | B |
|---|---|
| policy_owner.person.first_name | Bernard |
| policy_owner.person.last_name | Jarzyncka |
| car.catalog_price | 15000 |
will produce the following JSON:
{
"policy_owner": {
"person": {
"first_name": "Bernard",
"last_name": "Jarzyncka"
}
},
"car": {
"catalog_price": 15000
}
}
This approach is ideal for simpler outputs or when you prefer to see the full data path clearly in one place.
Using this approach can lead to unexpected behavior when the data path is not unique. You might not see that the output is already defined in another row and it will be overwritten.
2. Using multiple columns to represent hierarchy
Alternatively, you can represent each level of the hierarchy across separate columns.
Each column corresponds to a level of the JSON structure, and the final column contains the value.
| A | B | C | D |
|---|---|---|---|
| policy_owner | person | first_name | Bernard |
| last_name | Jarzyncka | ||
| car | catalog_price | 15000 |
This produces the exact same JSON output:
{
"policy_owner": {
"person": {
"first_name": "Bernard",
"last_name": "Jarzyncka"
}
},
"car": {
"catalog_price": 15000
}
}
This approach should be always preferred as it is more readable and easier to understand.
Arrays without Multi
You can also generate an array of objects in the output without using a Multi configuration.
To do this, simply include an index notation ([0], [1], etc.) in one of the columns.
Lansky interprets these indices as entries in an array under the same parent key.
For example:
| A | B | C | D |
|---|---|---|---|
| cars | [0] | catalog_price | 15000 |
| option_price | 5000 | ||
| cars | [1] | catalog_price | 8000 |
| option_price | 500 |
will produce the JSON:
{
"cars": [
{ "catalog_price": 15000, "option_price": 5000 },
{ "catalog_price": 8000, "option_price": 500 }
]
}
This approach is useful when you need to define a static or formula-based array directly in the output sheet,
without relying on a separate Multi mechanism.
This column-based structure is more visual and readable when designing large or nested outputs, as it directly mirrors the hierarchical layout of the final JSON object.
Skipping objects and array elements
Just like in Multi outputs, you can also use the special value __skip inside the output sheet.
If a cell contains __skip, Lansky will automatically remove:
- the entire object that contains it, if it’s part of a regular output structure, or
- the array element, if it appears inside the index notation column (like
[0],[__skip],[1], etc.).
Example
| A | B | C | D |
|---|---|---|---|
| cars | [0] | catalog_price | 15000 |
| option_price | 5000 | ||
| cars | [__skip] | catalog_price | 8000 |
| option_price | 500 |
Lansky will output:
{
"cars": [{ "catalog_price": 15000, "option_price": 5000 }]
}
The second car is skipped because one of its attributes contained __skip.
This mechanism makes it easy to conditionally control which objects or elements are included in the output,
using simple Excel formulas such as:
=IF(input!B2 > 10000, input!B2, "__skip")
When working with standard object structures, placing __skip in one of the upper-level columns will remove the entire object that follows in that row.
| A | B | C | D |
|---|---|---|---|
| policy_owner | __skip | first_name | Bernard |
| last_name | Jarzyncka | ||
| car | catalog_price | 15000 |
This produces:
{
"policy_owner": null,
"car": {
"catalog_price": 15000
}
}
In this case, the policy_owner object is skipped entirely because __skip was found in column B of its definition.
All subsequent nested keys (first_name, last_name, etc.) are therefore excluded from the output.
This behavior allows you to dynamically decide — using Excel formulas — whether a full object or a specific element in an array should be included in the final JSON.
For example:
=IF(input!B2="inactive", "__skip", input!B2)
This flexibility means that your calculator can fully control inclusion logic without any external scripting or conditions.
Because this behavior is handled directly in Excel, it adds a powerful layer of flexibility —
allowing you to conditionally include or exclude entire objects or list elements without additional scripting.
Warnings
When building the JSON, Lansky starts reading each row from the end and works backward to reconstruct the nested structure.
This means that if a row defines a parent object (for example, policy_owner.person), it may overwrite or replace an object previously defined elsewhere in the file.
To avoid unexpected overwriting, make sure that rows defining parent objects are either unique or clearly separated from rows that define their children.