【发布时间】:2026-02-03 12:45:01
【问题描述】:
嘿,
我有一个XtraReport,我想导出到 Excel 文件
之后我需要打印它,但我丢失了所有页面格式(页眉、页脚、每页重复...)
string reportPath = "c:\\Test.xls";
// Create a report instance.
XtraReport1 report = new XtraReport1();
reportDS c = new reportDS();
c.Init();
// genereaza report
report.DataSource = new reportDS[] { c };
// Get its XLS export options.
XlsExportOptions xlsOptions = report.ExportOptions.Xls;
// Set XLS-specific export options.
xlsOptions.ShowGridLines = true;
xlsOptions.TextExportMode = TextExportMode.Value;
// Export the report to XLS.
report.ExportToXls(reportPath);
// Show the result.
StartProcess(reportPath);
你能告诉我我想做什么吗?
如果没有,你能建议我另一种方法吗?
【问题讨论】:
标签: c# .net winforms devexpress