02-10-19, 10:21 PM
هذا كود ثان :
PHP كود :
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Private Sub ExportToExcel1_Click(sender As Object, e As EventArgs) Handles ExportToExcel1.Click
Dim exportOpts As New ExportOptions()
Dim excelFormatOpts As New ExcelFormatOptions()
Dim diskOpts As New DiskFileDestinationOptions()
exportOpts = rpt1.ExportOptions
excelFormatOpts.ExcelUseConstantColumnWidth = True
exportOpts.ExportFormatType = ExportFormatType.ExcelRecord
exportOpts.FormatOptions = excelFormatOpts
exportOpts.ExportDestinationType = ExportDestinationType.DiskFile
diskOpts.DiskFileName = "D:\\crystalExport.xls"
exportOpts.DestinationOptions = diskOpts
rpt1.Export()
End Sub
سبحان الله وبحمده سبحان الله العظيم و الحمد لله ولا اله الا الله والله اكبر
