How Can I Use the Excel Export Object's Properties?


06-19-2003, 12:00 PM
Although the Excel export is not WYSIWYG, there are several things you can do to control the results.

After you dimension the export object's variable, but before you export the report, you can set any of the following properties:

Example

[C#]
DataDynamics.ActiveReports.Export.Xls.XlsExport x = new DataDynamics.ActiveReports.Export.Xls.ExcelExport();
x.MinRowHeight=1;
x.MultiSheet=true;
x.RemoveVerticalSpace=true;
x.UseCellMerging=false;
x.MinColumnWidth=1;
x.FileFormat=DataDynamics.ActiveReports.Export.Xls.FileFormat.Xls95;
x.AutoRowHeight=true;
x.DisplayGridLines=true;
x.Export(this.viewer1.Document, Application.StartupPath + \\YourReport.xls);

[Visual Basic]
Dim x As New DataDynamics.ActiveReports.Export.Xls.XlsExport()
x.AutoRowHeight = True
x.DisplayGridLines = True
x.FileFormat = DataDynamics.ActiveReports.Export.Xls.FileFormat.Xls95
x.MinColumnWidth = 1
x.MinRowHeight = 1
x.MultiSheet = True
x.RemoveVerticalSpace = True
x.UseCellMerging = True
x.Export(Me.Viewer1.Document, Application.StartupPath + "\\YourReport.xls")