> ## Documentation Index
> Fetch the complete documentation index at: https://quill.co/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# useExport

> A simple way to export data from Quill

```tsx App.tsx theme={null}
import { QuillProvider, useExport } from "@quillsql/react";

function CustomComponent() {
  // pass in any report created in the Quill BI Platform
  const { downloadCSV } = useExport(QUILL_ID);
  return <button onClick={downloadCSV}>Save</button>;
}

function App() {
  return (
    <QuillProvider
      tenants={[{ tenantField: "customer_id", tenantIds: [2] }]}
      publicKey={process.env.QUILL_PUBLIC_KEY}
    >
      <CustomComponent />
    </QuillProvider>
  );
}
```

<Info>
  Make sure `QuillProvider` is a parent of the component using the `useExport`
  hook.
</Info>

<ParamField path="reportId" type="string" required>
  The id of the report you created in the Quill BI Platform.

  <Tip>
    Don't have an id yet? Learn how to [create a report](/docs/bi-platform/report) in the Quill BI Platform to get started.
  </Tip>
</ParamField>
