Server User Guides > Survey Tabulation > Exporting tables > Formatting the tables in Microsoft Excel
 
Formatting the tables in Microsoft Excel
When you export tables to Microsoft Excel, you can use styles to control the formatting. By default, the exported tables look the same whether you use styles or not. However, styles make it easy to change the look of your tables and apply standard formatting to multiple tables. If you want to use Excel to manipulate the data in the tables rather than printing them, you might prefer to export without using styles.
To use styles, choose the Use Excel styles option in the Microsoft Excel Exports dialog: see Microsoft Excel Exports dialog.
In Excel, each style has a name and defines a combination of formatting characteristics, such as font, font size, color, and emphasis, and indentation. When you apply a specified style to an item, all of the formatting that is stored in that style is automatically applied to the item. By changing the formatting defined for a style, you can quickly change the formatting of all of the items to which the style has been applied.
The following table lists the styles that are used by the Excel export.
Style type
Style name
Description
Annotations
Footer
Header
Used to format header and footer annotations.
Variabletext
VariableTextTop
VariableTextSide
Used to format variable names or descriptions in the table column headers.
Elementtext
ElementTextTop
ElementTextSide
Used to format category names or descriptions in the table row headers.
Cell values
Values
Used to format cell contents.
Styles applied to texts in a table
The following diagram shows the styles used to format the various texts in a table.
This graphic is described in the surrounding text.
The export does not apply borders to the exported tables using styles. To switch borders on and off, use the Display borders option in the Exports dialog.
To select the styles option, set the UseExcelStyles export property to True:
TableDoc.Exports.mrExcelExport.Properties["UseExcelStyles"] = True
You can apply a standard formatting to your exported tables: for example, because you have a house style. You can do this in two steps:
Set up the formatting and save it in a “master document”
1 Export your tables using the UseExcelStyles export property Use Excel styles option.
2 In Excel, adjust the formatting of the Excel Export styles shown in the table above to suit your requirements.
3 Save the Excel file.
Import your formatting into your exported files
1 Export your tables using the UseExcelStyles export property Use Excel styles option.
2 Open the master document you set up in step 1.
3 Open the newly exported Excel workbook if not already open, and then click Format > Style.
4 Click Merge.
5 In the Merge styles dialog, double-click the master document that contains the formatting you want to copy.
6 Choose Yes when you are prompted whether you want to merge the styles with the same names.
Headers and footers
All of the headers and footers are displayed left aligned, regardless of the positions selected in the Header and Footer dialog. This has the advantage that in a wide table all of the headers and footers are easily visible. This table shows the order in which the headers and footers are presented.
Headers
Footers
Title Header
Title Footer
Left Header
Left Footer
Center Header
Center Footer
Right Header
Right Footer
You can suppress the headers and footers from the export by clearing Display headers and footers.
See also
Microsoft Excel Exports dialog
See also
Exporting tables