# Export
URL: https://pro.rv-grid.com/guides/event-scheduler/export/
Source: src/content/docs/guides/event-scheduler/export.mdx
Description: Export scheduler events, workload, conflicts, coverage gaps, visible schedules, and print views.
The event scheduler exports data from the current projection, so filters, visible resources, conflicts, coverage, and utilization match what the user is reviewing.

```ts
const scheduler = (await grid.getPlugins()).find(
  (plugin) => plugin.constructor?.name === 'EventSchedulerPlugin',
);

const projection = scheduler.getProjection();

const eventsCsv = scheduler.exportEvents({ format: 'csv' });
const workloadJson = scheduler.exportResourceWorkload({ format: 'json' });
const conflictsCsv = scheduler.exportConflicts({ format: 'csv' });
const coverageCsv = scheduler.exportCoverage({ format: 'csv', gapsOnly: true });
const visibleCsv = scheduler.exportVisibleSchedule({ format: 'csv' });

download(eventsCsv.content, eventsCsv.fileName, eventsCsv.mimeType);
```

For printable schedules, create an HTML view from the same projection.

```ts
const print = scheduler.createPrintView({
  title: 'Weekly Staff Schedule',
  includeEvents: true,
  includeWorkload: true,
  includeConflicts: true,
  includeCoverage: true,
});

const printWindow = window.open('', '_blank');
printWindow?.document.write(print.html);
printWindow?.print();
```

## Production Checklist

- Use stable ids for events, resources, assignments, templates, and coverage requirements.
- Store scheduler datetimes as ISO strings and define a product time-zone policy before persisting user edits.
- Keep `eventSchedulerEvents` controlled by app state and persist every created, changed, and deleted event array.
- Enable `allowCreate` intentionally. It defaults to false.
- Add permission rules for locked resources, read-only events, completed statuses, and protected date ranges.
- Choose conflict policy deliberately. Use `prevent` or error rules for hard booking constraints.
- Use availability for real scheduling constraints and `nonWorkingTime` for visual closed-time guidance.
- Use `resourceGrouping`, `filters`, and `savedViews` for planner navigation instead of mutating source arrays.
- Use `coverage` and `utilization` only when the resource metadata needed for planning is present.
- Add remote validation and rollback for server-backed schedulers.
- Keep keyboard shortcuts enabled unless the host app owns all scheduler keyboard behavior.
- Expose export or print workflows from the plugin projection when planners need to share schedules.
- Test drag-create, move, resize, delete, selection, keyboard shortcuts, conflicts, and remote failure paths in the target framework.
