Build · Dashboard · beginner

Export Table Data to CSV

Dashboard General beginner LovableBolt.newCursor

How to use

  1. Copy the prompt below
  2. Paste it into Lovable, Bolt.new, Cursor
  3. Review the output and follow up with refinements
Prompt
Add a "Download CSV" button to the existing data table in this app. When clicked, the button should export only the rows that are currently visible — respecting any active search filters, column filters, or pagination — not the entire dataset. Include column headers in the first row of the CSV, using the same display names shown in the table headers. Name the downloaded file using the format "export-YYYY-MM-DD-HH-MM.csv" based on the current date and time. While the CSV is being generated, show a loading spinner inside the button and disable it to prevent double-clicks. When the download starts, show a brief success toast notification ("Export ready"). Ensure the exported CSV handles special characters and commas in cell values correctly by wrapping fields in quotes where needed.

Related prompts

Was this helpful?