美团经典回复顾客好评怎么看顾客的兑换券有没有消费成功

帮助企业打造成功软件!
热门搜索:
如何使用XtraReport将报表导出为XLS格式
如何使用XtraReport将报表导出为XLS格式
| 作者:慧都控件网 |
14:09:22| 阅读 0次
概述:下面的例子演示了如何使用XtraReport将报表导出为XLS格式。在这个过程中会用到XtraReport.ExportToXls方法。
下面的例子演示了如何使用将报表导出为XLS格式。在这个过程中会用到XtraReport.ExportToXls方法。
在示例之前,您首先需要添加一个新报表(命名为XtraReport1)到你的项目中,将一些报表控件拖放其中,然后执行下面的代码。
C#:Form1.cs
using System.Windows.F
using System.D
using DevExpress.XtraP
using DevExpress.XtraReports.UI;
namespace ExportToXlsCS {
public partial class Form1 : Form {
public Form1() {
InitializeComponent();
private void button1_Click(object sender, EventArgs e) {
// A path to export a report.
string reportPath = &c:\\Test.xls&;
// Create a report instance.
XtraReport1 report = new XtraReport1();
// Get its XLS export options.
XlsExportOptions xlsOptions = report.ExportOptions.X
// Set XLS-specific export options.
xlsOptions.ShowGridLines =
xlsOptions.TextExportMode = TextExportMode.V
// Export the report to XLS.
report.ExportToXls(reportPath);
// Show the result.
StartProcess(reportPath);
// Use this method if you want to automaically open
// the created XLS file in the default program.
public void StartProcess(string path) {
Process process = new Process();
process.StartInfo.FileName =
process.Start();
process.WaitForInputIdle();
VB:Form1.vb
Imports Microsoft.VisualBasic
Imports System
Imports System.Windows.Forms
Imports System.Diagnostics
Imports DevExpress.XtraPrinting
Imports DevExpress.XtraReports.UI
Namespace ExportToXlsCS
Partial Public Class Form1
Inherits Form
Public Sub New()
InitializeComponent()
Private Sub button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles button1.Click
' A path to export a report.
Dim reportPath As String = &c:\Test.xls&
' Create a report instance.
Dim report As New XtraReport1()
' Get its XLS export options.
Dim xlsOptions As XlsExportOptions = 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)
' Use this method if you want to automaically open
' the created XLS file in the default program.
Public Sub StartProcess(ByVal path As String)
Dim process As New Process()
process.StartInfo.FileName = path
process.Start()
process.WaitForInputIdle()
End Namespace
慧都控件|提供软件技术整体解决方案
云集全球三千余款优秀控件、软件产品,提供行业领先的咨询、培训与开发服务
企业QQ:|电话:023-
服务与支持
重庆 / 023-
北京 / 010-
400-700-1020
慧都旗下网站
慧都科技有限公司 版权所有 Copyright
100%正版软件
400-700-1020
<input type="hidden" id="url" value=""/>1、报表文件的保存
XtraReport1 report = new XtraReport1();
report.ShowPreviewDialog();
report.SaveLayout("C:\\abc.rep");
report.Dispose();
2、报表文件的读取
DevExpress.XtraReports.UI.XtraReport report = new DevExpress.XtraReports.UI.XtraReport();
report.LoadLayout("C:\\abc.rep");
report.ShowPreviewDialog();
report.Dispose();
阅读(...) 评论()
深圳市米软科技有限公司(米软科技 ),专注于 HR 人力资源管理软件、HIS 医院信息化管理软件、OA 智能办公软件开发}

我要回帖

更多关于 回复美团顾客的好评 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信