急:水晶报表如何转换成EXCEL,谢谢!

发布网友 发布时间:2022-04-22 08:41

我来回答

1个回答

热心网友 时间:2023-06-26 02:51

switch (ddlFormat.SelectedItem.Text)
{
case "Rich Text (RTF)":
ReportDoc.ExportOptions.ExportFormatType = CrystalDecisions.Shared.ExportFormatType.RichText;//
DiskOpts.DiskFileName = "c:\\Output.rtf";//
break;
case "Portable Document (PDF)":
ReportDoc.ExportOptions.ExportFormatType = CrystalDecisions.Shared.ExportFormatType.PortableDocFormat;//
DiskOpts.DiskFileName = "c:\\Output.pdf";//
break;
case "MS Word (DOC)":
ReportDoc.ExportOptions.ExportFormatType = CrystalDecisions.Shared.ExportFormatType.WordForWindows;//
DiskOpts.DiskFileName = "c:\\Output.doc";//
break;
case "MS Excel (XLS)":
ReportDoc.ExportOptions.ExportFormatType = CrystalDecisions.Shared.ExportFormatType.Excel;//
DiskOpts.DiskFileName = "c:\\Output.xls";//
break;
default:
break;
}

声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com