> For the complete documentation index, see [llms.txt](https://docs.avonnicomponents.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.avonnicomponents.com/dynamic-components/component-builder/interactions/copy-records.md).

# Copy Records

The **Copy Record(s) to Clipboard** interaction copies Data Table rows straight to the user's clipboard, in a spreadsheet-ready format.

## Overview

The **Copy Record(s) to Clipboard** interaction is a specialized action available exclusively for the Data Table component. It allows users to copy information from table rows directly to their clipboard, making it easy to paste the data into other applications such as Excel, Google Sheets, or email.

<mark style="background-color:orange;">**Availability**</mark>**:** This interaction is available on Data Table components as both a **row action** and a **header action**. As a row action it copies the clicked row; as a header action it copies the selected rows, or all visible records when none are selected.

When users click a button or action configured with the Copy Record(s) to Clipboard interaction, the system automatically copies the relevant data from the Data Table to the clipboard as tab-separated values, one line per record — the format spreadsheets expect.

### **Key features**

* Copies the clicked row as a row action, and the selected rows — or every visible row when nothing is selected — as a header action
* Includes column headers for context
* Formats data for easy pasting into spreadsheet applications
* Works with single or multiple row selections
* Provides immediate feedback when the copy is successful, with a "Copied to clipboard." toast

***

## Configuration

Copy Record(s) to Clipboard requires no interaction-specific settings — as a row action it copies the clicked row, and as a header action it copies the selected rows (or all visible records when none are selected). Configuration consists of adding the action to a Data Table header action or row action.

### **Location**

Data Table component → Header Actions, or Row Actions for a per-row copy

1. Select your Data Table component on the canvas
2. In the properties panel, find the **Header Actions** section — or the **Row Actions** section to copy one row at a time
3. Click **Add Action** or **New Header Action**
4. Choose **Copy Record(s) to Clipboard** as the interaction type
5. Configure the action properties (label, icon, etc.)

{% hint style="warning" %}

#### Important

Copy Record(s) to Clipboard is available on Data Table components as both a row action and a header action:

* As a **row action**, it copies the clicked row.
* As a **header action**, it copies the selected rows, or all visible records when none are selected.
  {% endhint %}

***

## Example

### **How users interact with Copy Record(s) to Clipboard**

1. **Select rows** in the Data Table (single or multiple) — or select nothing to copy every visible row
2. **Click the copy action** in the table header, or on the row itself for a row action
3. **System copies the data** to the clipboard
4. **Confirmation appears** — a toast titled "Copied to clipboard."
5. **User pastes** the data into another application using Ctrl+V (Windows) or Cmd+V (Mac)

### **What gets copied**

* All visible columns from the copied rows
* Column headers (for context)
* Formatted as tab-separated values, one line per record
* Hidden columns are excluded, and HTML markup is stripped from the values

***

## Important Considerations

Accessibility considerations when configuring Copy Record(s) to Clipboard:

* **Keyboard access:** Ensure the copy action can be triggered via keyboard navigation (Tab + Enter)
* **Screen reader support:** Use descriptive labels that clearly indicate the action's purpose
* **Visual feedback:** Provide both visual (toast) and potentially auditory confirmation
* **Alternative methods:** Consider providing export options in addition to clipboard copying for users who may have difficulty with clipboard operations

***

## Troubleshooting

### Copy action doesn't appear

**Possible causes**

* Action not added as a header action or a row action
* Visibility conditions hiding the action
* Incorrect component type (not a Data Table)

**Solutions**

* Verify the action is added under Header Actions or Row Actions
* Check visibility conditions to ensure they evaluate to true
* Confirm you're working with a Data Table component

***

### Nothing copied to the clipboard

**Possible causes**

* The table's data is not loaded yet — the component answers with an "Impossible to copy" toast
* Browser permissions blocking clipboard access
* JavaScript errors preventing the action

**Solutions**

* Wait for the table to finish loading, then copy again — a header action with no selection copies every visible row
* Check browser console (F12) for permission errors
* Grant clipboard permissions if prompted by the browser
* Test in a different browser to rule out browser-specific issues

***

### Copied data format is wrong

**Possible causes**

* Hidden columns being included or excluded
* Special characters are causing formatting issues
* Locale-specific formatting differences

**Solutions**

* Review which columns are visible in the table
* Check for special characters in data that might break formatting
* Test with simple data first to isolate formatting issues
* Consider data cleansing if special characters are problematic

***

### Copy action works but paste doesn't

**Possible causes**

* Target application doesn't support the data format
* Clipboard was overwritten before pasting
* Paste permissions blocked in target application

**Solutions**

* Verify the target application supports tab-separated data
* Copy and paste immediately without copying anything else in between
* Try pasting into a simple text editor first to verify the data is in clipboard
* Check target application's paste permissions and settings


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.avonnicomponents.com/dynamic-components/component-builder/interactions/copy-records.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
