-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathExportActions.vb
More file actions
27 lines (22 loc) · 836 Bytes
/
ExportActions.vb
File metadata and controls
27 lines (22 loc) · 836 Bytes
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
Imports System
Imports System.IO
Imports System.Drawing
Imports System.Diagnostics
Imports DevExpress.Spreadsheet
Namespace SpreadsheetExamples
Public Module ExportActions
#Region "Actions"
Public ExportToPdfAction As Action(Of Workbook) = AddressOf ExportToPdf
#End Region
Private Sub ExportToPdf(ByVal workbook As Workbook)
workbook.Worksheets(0).Cells("D8").Value = "This document is exported to the PDF format."
#Region "#ExportToPdf"
' Export the workbook to PDF.
Using pdfFileStream As FileStream = New FileStream("Documents\Document_PDF.pdf", FileMode.Create)
workbook.ExportToPdf(pdfFileStream)
End Using
#End Region ' #ExportToPdf
Call Process.Start("Documents\Document_PDF.pdf")
End Sub
End Module
End Namespace