REFERENCE
U.PASTE
Summary
Pastes the values of specified data into specified location(s) in workbook. Causes undo history in sheet(s) receiving pasted values to be lost (only those sheets; undo history for other sheets in workbook is retained)
Syntax
=U.PASTE(data_or_topic, target, [max_columns], [max_rows], [page_filter], [recursive], [from_topic], [preserve_formulas], [block])
Parameters
| Parameter | Required | Description |
|---|---|---|
data_or_topic |
Yes | The range whose values will be incremented. If only a valid topic or cache key is provided, then pages of that report will be used. To have a topic or cache key pasted instead of its underlying data, prefix the topic or cache key with [IGNORE_CACHE] |
target |
Yes | The range(s) in the workbook into which the data values will be pasted |
[max_columns] |
No | The max number of columns across which to paste values. By default is set to the width of the corresponding target range if that range is a matrix or row vector, otherwise width is unbounded. Set to TRUE to signify an arbitrarily large number |
[max_rows] |
No | The max number of rows in which to paste values. By default is set to the height of the corresponding target range if that range is a matrix or column vector, otherwise height is unbounded. Set to TRUE to signify an arbitrarily large number |
[page_filter] |
No | If set to an array of page numbers and/or page names, only the specified pages will be used when pasting into target range(s) |
[recursive] |
No | Set to TRUE when data being pasted is ultimately sourced from the exact range receiving the pasted values. If not set to TRUE in this situation, then target may flicker due to multi-thread race conditions. Set to -1 for cell-by-cell pasting and -2 to only perform cell-by-cell paste if some rows are hidden |
[from_topic] |
No | If set to a valid topic then then paste will only occur if data for topic is first retrieved from the server. Also used to indicate the topic pasted in cases where report data is transformed before pasted into a range |
[preserve_formulas] |
No | Set to TRUE to prevent pasting over a range that contains formulas. To fail the paste of every range in a multi-range paste when any formula in any range is detected, set to "strong" (this will also fail an entire range in cell-by-cell pastes if a formula is found) |
[block] |
No | If set to TRUE then method will not be calculated unless triggered by user interaction or calculated as a step in a script; If set to a number then will be throttled to not calculate more frequently than the specified number of seconds; make number negative to prevent auto recalc of blocked methods |
Behavior
The documented public interface is supported by the current U Add-in source signature and the maintained Usage Examples workbook. Optional parameters are shown in square brackets in the syntax above; omit the brackets when entering a formula.
Return Value
Returns the function result or action status described by the formula and parameters above. The maintained sources do not define a narrower, stable return contract for this function.
Examples
Notes
- Formula examples are preserved from maintained workbook usage and normalized to the current
U.prefix. - Complete formulas demonstrate working patterns; they do not imply that undocumented option values are supported.
- Where maintained sources do not specify every accepted value, default, or error message, this page does not infer one.
- For functions that perform actions, use a visible trigger or supported block/throttle parameter to avoid unintended repetition during recalculation.
Related
- Concept: Workbook Automation
- How-to: Respond to Clicks and Notifications
- Example: Click-Driven Script