Import and Export
- 2 minutes to read
The fastest way to export Scheduler data is to save it in XML format to a file or stream. To do that, choose the sub-storage whose data you want to export, and call the
schedulerStorage.Appointments.SaveToXml(Application.StartupPath + "\\Data\\Appointments.xml"); schedulerStorage.Resources.SaveToXml(Application.StartupPath + "\\Data\\Appointments.xml"); schedulerStorage.AppointmentDependencies.SaveToXml(Application.StartupPath + "\\Data\\Appointments.xml");
All three storage collections provide the
LoadFromXml method that allows you to import Scheduler data back from a file or stream.
Synchronization with Google Calendars
The Google Calendars article explains how to set up the synchronization between a DevExpress WinForms Scheduler and a Google Calendar. Unlike direct data import or export, the synchronization process compares data in both calendars when triggered. This allows you to:
- resolve synchronization conflicts that occur when the same appointment is edited differently in each calendar;
- choose which appointments to import/export, and which to skip;
- correctly transfer data that is supported in one calendar type only (for example, Google event categories do not match default DevExpress appointment labels, and DevExpress appointments have no fields that correspond to Google event gID and etag properties used to identify these events).
Import and Export from (to) Microsoft Outlook
Data exchange between the DevExpress Scheduler and a Microsoft Outlook calendar is performed using two separate components:
- AppointmentImportSynchronizer - imports data from Outlook into Scheduler.
- AppointmentExportSynchronizer - exports data from Scheduler to Outlook.
Outlook appointments have unique ID values stored in the EntryID property. In order to work with these IDs, you need to add a dedicated data field in your data source. Whenever a synchronization process tells a Scheduler to create, remove or modify an appointment, the AppointmentSynchronizer.AppointmentSynchronizing event fires, and you can use these IDs to cancel individual edits and resolve potential conflicts.
VCalendar 1.0 and iCalendar
DevExpress Scheduler supports direct data import (export) from (to) VCalendars and iCalendars. No advanced synchronization mechanism that detects potential conflicts and data duplication is available.