Report Format Types - Visual Excel

Summary

Reports in AdapTable are not WYSIWYG (What You See is What You Get).

It is the Grid's underlying raw data, rather than display values, styles or grouping, which is exported.

Note

  • Developers do, however, have some control over the Formatting of other Reports
  • They can set how to format dates and choose between exporting cell raw (the default) or display values

The one exception to this "data-only" rule is the VisualExcel Report Format Type.

This exports Columns that contain styles so that they appear in Excel the same way as they do in AdapTable.

The VisualExcel Report Format Type includes the following elements:

Exporting Styles

AdapTable will export styles that have been created in AG Grid or AdapTable into Excel format.

This means that if there are any AG Grid Excel Styles defined, Adaptable will try to render them.

Caution

Any AdapTable Styles defined with the Format Column will always take precedence over AG Grid styles

Hint

  • We recommend using AdapTable's versatile Format Columns instead of AG Grid's standard value formatters
  • It offers ingrained styling support for Excel and ensures the Format Column definition is the sole source of truth
VisualExcel Report Format Type
Fork
Try It Out
  • Switch to Grouped Layout - note how the Column Formats are preserved

Exporting Formats

The VisualExcel Report Format always exports any Display Formats currently rendered in AdapTable.

Caution

  • The exportDataFormat property in Export Options evaluates whether to export raw value or display value
  • But (only) the VisualExcel Report Format Type ignores this since it only exports display values

Exporting Excel Dates

When using the VisualExcel Report Format Type, Date columns can be explicitly exported as Excel Date cells.

Hint

This means that Excel will see the Column as a Date and treat it as such when providing Filters and other functionality

To achieve this, the following are required:

Exporting Styled Columns

The VisualExcel Report Format Type will only export the Gradient Style Styled Column.

This is because it simply contains a back colour which is easy to send to Excel.

Caution

The VisualExcel Report Format Type will not export Percent Bar or Badge or Sparkline Column Styled Columns