Professional > Table scripting > Exporting tables > HTML tables export > HTML tables export properties
 
HTML tables export properties
Sample script file: HTMLExportOptions.mrs
This example script is based on the Museum sample data set. See Running the sample table scripts for information on running the example scripts.
When you export tables to HTML, you can control a number of options using the export properties.
Available export properties
ChartCategoryElements
Set to "Per element" to produce a chart for each category element. Set to "Per variable" to produce a chart for each variable block of category elements. Set to "Per table" to produce a single chart for all category elements in the table.
Note When using a custom pie chart or template, ChartCategoryElements must be set to "Per element".
Type: String:
"No chart", "Per element", "Per variable", "Per table".
Default value: "Per variable"
ChartCellItem
Where there is more than one cell item on the table, specifies the cell item to chart. The cell item must be included in the table. If the specified cell item does not exist then Count will be used, and if Count does not exist, the first cell item is used.
Type: String:
"Count"
"ColPercent"
"RowPercent"
"TotalPercent"
"Mean"
"Sum"
"Minimum"
"Maximum"
"UnweightedCounts"
"CumColPercent"
"CumRowPercent"
"Range"
"Mode"
"Median"
"Percentile"
"StdDev"
"StdErr"
"Variance"
Default value: "ColPercent"
ChartColPropResults
When true, displays the column IDs beside the category labels, and adds the column proportions test results to the chart (above the relevant columns). This property is effective when the ChartingEngine value is "ExportHTML.nViZn".
Type: Boolean
Default value: False
ChartingEngine
Indicates the available charting engine program IDs.
Type: String
"ExportHTML.nViZn"
"ExportHTML.OWC"
Default value: "ExportHTML.nViZn"
ChartRowsAsSeries
If true, table rows are used to form the chart series. If false, table columns are used.
Type: Boolean
Default value: True
ChartSpecialElements
Set to "Per element" to create a chart for any special statistical elements (mean, standard deviation, etc) in the orientation specified in the ChartRowsAsSeries property. Set to "Per variable" to produce a chart for each variable block of special elements. Set to "Per table" to produce a single chart for all special elements in the table.
Type: String: "No chart", "Per element", "Per variable", "Per table".
Default value: "Per element"
ChartTemplate
Identifies the chart template. Specifying the name of the chart template allows you to use a custom chart template that was created in Microsoft Excel. This property is effective when the ChartingEngine value is "ExportHTML.nViZn".
Type: String
Default value: "" (Empty string)
ChartTemplateLocation
The chart template location. It is not necessary to specify this property because its value is set when the chart template file is specified. This property is effective when the ChartingEngine value is "ExportHTML.nViZn".
Type: String
Default value: "" (Empty string)
ChartType
Indicates the type of chart that is to be created. Specifying the name of the custom chart allows you to use a custom chart.
The "Heat Map" chart type is only available when the ChartingEngine value is "ExportHTML.nViZn".
Type: String:
"Clustered Bar"
"Stacked Bar"
"3D Clustered Bar"
"3D Stacked Bar"
"Clustered Column"
"Stacked Column"
"3D Clustered Column"
"3D Stacked Column"
"3D Column"
"Line"
"Stacked Line"
"Line with Markers"
"100% Stacked Line with Markers"
"Pie"
"3D Pie"
"Separated Pie"
"3D Separated Pie"
"Custom chart name"
"Heat Map"
Default value: "Clustered Column"
CssLocation
The location of the custom style sheet. It is not necessary to specify this property if the custom style sheet is in the output folder.
Type: String
Default value: "" (An empty string.)
CustomCss
The exported HTML files use CustomCss as the CSS filename. Note: CustomCss must exist in the target folder or the folder specified in CssLocation.
Type: String
Default value: "" (An empty string.)
Destination
Location and filename of the exported HTML file.
Type: String
Default value: "" (An empty string.) When the location is not specified, the HTML output will be created in your default temporary folder. If you do not know where this is, you can find out by opening a command prompt and typing cd %temp%. This displays the location of the temporary folder. You can then browse to this folder in Windows Explorer to find the HTML output.
DisplayAnnotations
Determines whether annotations are included in the export.
Type: Boolean
Default value: True
DisplayLastCategoryBase
Determines whether to display the base for the last data point in the chart legend. This option is applicable only when charting special elements. If the Count cell item is present, this is used. If not, the Unweighted Count cell item is used.
Type: Boolean
Default value: False
DisplayLogo
Specifies whether a logo should be inserted in the top left corner of the HTML file. The UNICOM Systems, Inc. logo is provided for use as a default logo, but this can easily be replaced with any other suitable logo.
Type: Boolean
Default value: True
DisplayOption
Specifies whether the export should create tables only, charts only, or both tables and charts and whether the chart or the table should be shown first.
Type: String:
"Table Only"
"Table and Chart"
"Chart and Table"
"Chart Only"
Default value: "Table and Chart"
DisplaySeriesBase
Indicates that the base for each of the chart series should be displayed in the legend for the chart.
Type: Boolean
Default value: False
DisplayTitle
Determines whether or not the project description is displayed as the title in the HTML output.
Type: Boolean
Default value: True
EmbedCss
Determines whether the style sheet is to be embedded within the HTML file or in a separate file. Embedding the style sheet is useful when you want to distribute the HTML output, for example, by email.
Type: Boolean
Default value: True
FormatPercentageAxes
Determines whether to chart percentages on a scale of 0 to 100%. If this option is false, the scale is based on the biggest value in the chart.
Type: Boolean
Default value: False
HorizontalSideAxis
This option enables you to choose whether to display text on the side axis horizontally or vertically.
Type: Boolean
Default value: True
IncludeTOC
This option enables you to choose whether to display a table of contents. This option only has an effect when used with the "Single Document" layout style.
If only one table is exported, no table of contents is displayed.
Type: Boolean
Default value: True
Interactive
Interactive mode. See HTML tables export - interactive mode for more information.
Type: Boolean
Default value: False
LaunchApplication
Display the exported tables in the default Web browser.
Type: Boolean
Default value: False
LayoutStyle
Specifies the layout style to be used. See HTML tables export layout styles for more information.
Type: String:
"Single Document"
"Table of Contents"
"Frame Table of Contents"
Default value: "Single Document"
OverwriteOutput
Determines whether an existing HTML file should be overwritten. See HTML tables export - interactive mode for more information.
Type: Boolean
Default value: False
PresentationStyle
Specifies the style sheet (CSS file) to be used. See HTML tables export: Customizing the style sheet for more information.
Type: String:
"Black and White"
"Default"
Default value: "Default"
PrintingPageBreak
Adds a printing page break between tables (not between table and chart). This is relevant only for the Single Document layout style.
Type: Boolean
Default value: True
SizeChartToContent
This prperty is only effective when IBM SPSS Visualization is selected as the charting engine. By default, IBM SPSS Visualization does not dynamically adjust the image size. Selecting this option prevents truncation of the legend and content in generated charts, and provides an adequate chart width. Enabling this option may result in decreased charting performance.
Type: Boolean
Default value: False
TurnOnNViZnLog
When set to True, and the charting engine is IBM SPSS Visualization, log files are generated in the directory %TEMP%\nViZn.
Type: Boolean
Default value: False
UseElementLabels
Determines whether element names or the more friendly element labels are to be used for the row and column labels in the exported tables.
Type: Boolean
Default value: True (Use labels)
UseFormattedLabels
This option enables you to use HTML formatting of variable and element labels in a similar way to using HTML formatting in the annotations. Note that using this option may make the export run a little more slowly. See HTML tables export: Formatted labels for more information.
Type: Boolean
Default value: False
UseStyles
Exports styles associated with elements. In the current version, this enables you to export images associated with elements. See Displaying images for elements for more information.
Type: Boolean
Default value: True
UseVariableLabels
Determines whether variable names or the more friendly labels are to be used for variable texts in the exported tables.
Type: Boolean
Default value: True (Use labels)
Examples
1. Suppressing the logo
By default, the exports include the UNICOM Systems, Inc. logo. You can change the logo by simply replacing the logo file in the output folder. Alternatively, you can suppress the inclusion of the logo by setting the DisplayLogo export property to False:
TableDoc.Exports.mrHtmlExport.Properties["DisplayLogo"] = False
2. Showing charts and tables
By default, tables and charts are exported. However, you can choose to export charts only or tables only. You do this by setting the DisplayOption export property. If you want to show tables and charts, you can specify that the chart should be shown first by setting the property to "Chart and Table":
TableDoc.Exports.mrHtmlExport.Properties["DisplayOption"] = "Chart and Table"
For details of how data is displayed in charts, see Creating charts.
If you want to export tables only, set the property to "Table only":
TableDoc.Exports.mrHtmlExport.Properties["DisplayOption"] = "Table only"
3. Changing the style sheet
The HTML Export component comes with two built-in style sheets--Default, which has a blue background, and Black and White, which, as its name suggests, has black text on a white background. You select the Black and White style sheet by setting the PresentationStyle export property to "Black and White":
TableDoc.Exports.mrHtmlExport.Properties["PresentationStyle"] = "Black and White"
4. Using a custom style sheet
You can create your own style sheet and use it to replace the built-in style sheet. To use a custom style sheet, specify the file name in the CustomCss property. The custom style sheet must be present in the output folder, or in the folder specified in the CssLocation property.
If the custom style sheet is in the output folder, you do not need to specify the location of the style sheet. However, if you use this method, you cannot embed the custom style sheet. Set the EmbedCss export property to False:
TableDoc.Exports.mrHtmlExport.Properties["EmbedCss"] = False
TableDoc.Exports.mrHtmlExport.Properties["CustomCss"] = "MyCustomStyleSheet.css"
If you specify the location in the CssLocation property, you can either embed the style sheet or export it as a separate file:
TableDoc.Exports.mrHtmlExport.Properties["EmbedCss"] = True
TableDoc.Exports.mrHtmlExport.Properties["CssLocation"] = “C:\MyTemplates\”
TableDoc.Exports.mrHtmlExport.Properties["CustomCss"] = "MyCustomStyleSheet.css"
For details of how to create and customize a style sheet, see HTML tables export: Customizing the style sheet.
See also
HTML tables export