Currently MindFusion.Scheduling supports exporting to image, XLSX, and PDF formats.
To export a Calendar as an image, call one of the CreateImage overloads. These methods allow exporting the entire control or only the currently visible portion of it. All methods return an instance of the Bitmap class, which contains the exported image. This image needs to be subsequently saved to a file or a stream.
The following example illustrates how to export the currently visible area of calendar to an image file identified by the imagePath variable.
C# Copy Code |
---|
using (Image image = calendar.CreateImage(true)) |
VB.NET Copy Code |
---|
Using image As Image = calendar.CreateImage(True) |
Add references to the MindFusion.Scheduling.Excel.dll and MindFusion.Excel.dll assemblies to your project. Create an ExcelExporter instance and call its Export method, passing a reference to the calendar to be exported and a string specifying the output file name.
The following example shows how to export a calendar to an XLSX file. The example assumes that xlsxPath is a variable containing the name of the file to export to and calendar is a variable identifying the Calendar to export.
C# Copy Code |
---|
MindFusion.Scheduling.Export.ExcelExporter excelExporter = |
VB.NET Copy Code |
---|
Dim excelExporter As New MindFusion.Scheduling.Export.ExcelExporter() |
Add references to the MindFusion.Scheduling.Pdf.dll and MindFusion.Pdf.dll assemblies to your project. Create a PdfExporter instance and call its Export method, passing a reference to the calendar to be exported and a string specifying the output file name.
The following example shows how to export a calendar to a PDF file. The example assumes that pdfPath is a variable containing the name of the file to export to and calendar is a variable identifying the Calendar to export.
C# Copy Code |
---|
MindFusion.Scheduling.Export.PdfExporter pdfExporter = |
VB.NET Copy Code |
---|
Dim pdfExporter As New MindFusion.Scheduling.Export.PdfExporter() |