-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProgram.cs
27 lines (24 loc) · 882 Bytes
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#region #namespaces
using DevExpress.Spreadsheet;
using DevExpress.XtraPrinting;
using DevExpress.XtraSpreadsheet.Services;
using DevExpress.XtraSpreadsheet.Services.Implementation;
#endregion #namespaces
namespace WorksheetChartsExportPDF
{
class Program
{
static void Main(string[] args)
{
#region #ExportToPDF
Workbook workbook = new Workbook();
//Register required services.
workbook.AddService(typeof(IChartControllerFactoryService), new ChartControllerFactoryService());
workbook.AddService(typeof(IChartImageService), new ChartImageService());
workbook.LoadDocument("testDocument.xlsx");
workbook.ExportToPdf("resultingDocument.pdf");
#endregion #ExportToPDF
System.Diagnostics.Process.Start("resultingDocument.pdf");
}
}
}