XLS is a format that opens in Microsoft Excel as a spreadsheet. This export does not render reports exactly as they appear in the Viewer due to inherent differences in the formats. The XLS export filter has a number of useful properties that allow you to control your output. You can set the properties either in code using the export object, or by selecting the object in the component tray below the form and using the Properties window.
Table of XLS Export Properties
Property | Valid Values | Description |
---|---|---|
AutoRowHeight | True or False (default) | Set to True to have Excel set the height of rows based on the contents. Otherwise XlsExport calculates the height of rows. In some cases this may make the output look better inside Excel. However, a value of True may adversely affect pagination when printing, as it may stretch the height of the page. |
DisplayGridLines | True (default) or False | Set to False to hide grid lines in Excel. |
FileFormat | Xls97Plus (default) or Xls95 | Set to Xls95 to use Microsoft Excel 95 format. Otherwise, a format optimized for Excel 97 and newer is used. |
MinColumnWidth | Single (VB) or float (C#) |
Set the number of inches that is the smallest width for a column in the exported spreadsheet. Tip: Larger values reduce the number of empty columns in a sheet. Set this value to 1 inch or more to get rid of small empty columns. |
MinRowHeight | Single (VB) or float (C#) |
Set the number of inches that is the smallest height for a row in the exported spreadsheet. Tip: Larger values force the export to place more controls on a single line by reducing the number of rows added to match blank space. Set this value to .25 inches or more to get rid of small empty rows. |
MultiSheet | True or False (default) |
Set to True to export each page of your report to a separate sheet within the Excel file. This can increase performance and output quality at the cost of memory consumption for reports with complex pages and a lot of deviation between page layouts. In general, use False for reports with more than 30 pages. |
RemoveVerticalSpace | True or False (default) | Set to True to remove vertical empty spaces from the spreadsheet. This may improve pagination for printing. |
UseCellMerging | True or False (default) | Set to True to merge cells where applicable. |
The OutputFormat property of the TextBox control supports the following numeric types:
A numeric value of the TextBox control is exported to Excel as a number if the Value property is set to a supported numeric type and the OutputFormat property is set to a valid value.
A date value of the TextBox control is exported to Excel as a date if the Value property is set to a supported date type and the OutputFormat property is set to a valid value.
The numeric and date value of the TextBox control is exported to Excel as text in the following cases:
A numeric value of the Label and RichTextBox controls is always exported to Excel as text.
Usage:
Does not support: