安装AR SP4Private Function SaveFile(ByVal strTitle As String, ByVal strFilter As String)
dlgFile.DialogTitle = strTitle
dlgFile.Filter = strFilter
dlgFile.FilterIndex = 1
dlgFile.ShowSave
SaveFile = dlgFile.FileName
End FunctionPrivate Sub ExportExcel_Click()
Dim xls As New ActiveReportsExcelExport.ARExportExcel
Dim sFile As String
Dim bSave As Boolean sFile = SaveFile("保存为Excel", "Excel 格式(*.xls)|*.xls|")
xls.FileName = sFile
If arvReport.Pages.Count > 0 Then
xls.Export arvReport.Pages
ElseIf Not arvReport.ReportSource Is Nothing Then
If arvReport.ReportSource.Pages.Count > 0 Then
xls.Export arvReport.ReportSource.Pages
End If
End If
Set xls = NothingEnd Sub
dlgFile.DialogTitle = strTitle
dlgFile.Filter = strFilter
dlgFile.FilterIndex = 1
dlgFile.ShowSave
SaveFile = dlgFile.FileName
End FunctionPrivate Sub ExportExcel_Click()
Dim xls As New ActiveReportsExcelExport.ARExportExcel
Dim sFile As String
Dim bSave As Boolean sFile = SaveFile("保存为Excel", "Excel 格式(*.xls)|*.xls|")
xls.FileName = sFile
If arvReport.Pages.Count > 0 Then
xls.Export arvReport.Pages
ElseIf Not arvReport.ReportSource Is Nothing Then
If arvReport.ReportSource.Pages.Count > 0 Then
xls.Export arvReport.ReportSource.Pages
End If
End If
Set xls = NothingEnd Sub
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货