代码修改为:
Dim sectionReport As New SectionReport1()
sectionReport.Run();
Dim xlsExport1 As New GrapeCity.ActiveReports.Export.Excel.Section.XlsExport()
xlsExport1.FileFormat = GrapeCity.ActiveReports.Export.Excel.Section.FileFormat.Xlsx
xlsExport1.Export(sectionReport.Document, Application.StartupPath + "\\xxx.xlsx")
如果仍然报错,您可以在开始菜单,找到GrapeCity ->本机示例程序—>rofessional 文件夹下打开EndUserDesigner 示例程序,运行之后,使用EndUserDesigner, 打开您所设计的报表,选择预览,看看是否能正常导出。 |