If File.CheckFile((System.Configuration.ConfigurationSettings.AppSettings("JIMTEMPLATEPATH") & PrmJIM904C.C_EXCEL_NAME), True) = "" Then
Me.Opacity = 0
Me.Close()
Exit Sub
End If
XlsReport1.FileName = System.Configuration.ConfigurationSettings.AppSettings("JIMTEMPLATEPATH") & PrmJIM904C.C_EXCEL_NAME
XlsReport1.Report.Start()
Me.Opacity = 0
Me.Close()
Exit Sub
End If
XlsReport1.FileName = System.Configuration.ConfigurationSettings.AppSettings("JIMTEMPLATEPATH") & PrmJIM904C.C_EXCEL_NAME
XlsReport1.Report.Start()
XlsReport1.Report.File()
JIMTEMPLATEPATH :excel模板的地址
PrmJIM904C.C_EXCEL_NAME : excel 模板名字
With XlsReport1
XlsReport1.PageInfo = "1-99999"
XlsReport1.SheetName = "JM230B"
XlsReport1.Page.Start()
ViewerControl1.Clear()
.Page.End()
End With
ViewerControl1.Document = XlsReport1.Document
XlsReport1.Report.End()