setPlaceholder

fills placeholders in a table with data

void setPlaceholder(object|string placeholder, [number|string value] );
placeholder
object|stringdata properties which can be set as SpreadSheet values value
number|stringvalue of the placeholder, if passed as a string

Example

$$("ssheet").setPlaceholder({value:"France", expense:1366, income:842});

Related samples

Details

If the placeholder is a string, you need to provide the value parameter as well:

$$("ssheet").setPlaceholder("expense", 1366);

Pay attention that the names of placeholders can't contain the following special characters:

It is recommended to use underscores instead of spaces in the names of placeholders that contain several words, for example: "my_name".

Adding placeholders on an extra sheet on Excel export

Take notice that while exporting Spreadsheet data to Excel, placeholders are replaced with their values. For example, if you have a placeholder =A1+{{value}}, where value is 10, the formula in the cell will be replaced with the expression =A1+10.

However, you can put all the placeholders to a separate sheet and refer to them as =A1+Placeholders!B1 (where "Placeholders" is the name of the sheet with placeholders). This approach allows you to edit them in the Excel file.

Related sample:  Spreadsheet: Extra Placeholder Sheet on Excel Export

See also
  • Articles
  • Back to top
    Join Our Forum
    We've retired comments here. Visit our forum for faster technical support, connect with other developers, and share your feedback there.