Report Format Type - Excel
Summary
- Excel exports produce a downloadable workbook (Clipboard is not available for this format)
- Requires AG Grid's
ExcelExportModule - Use
excelSheetNamein Export Options for the default worksheet name; useexportReport+exportConfig.exportParamsfor one-off AG Grid Excel params
The most commonly used Report Format Type is Excel, where the exported data can be opened in Excel.
Caution
This option is only available if the ExcelExportModule AG Grid Module is loaded
When using this option only the downloadable File System Export Destination is available (i.e. the data cannot be sent to the Clipboard).
Hint
Users are able to create a Custom Export Destination, e.g S3, and then export the Excel formatted data there
Excel sheet name
By default AdapTable names the worksheet Sheet 1. Set excelSheetName in Export Options to change that for every Excel or Visual Excel export.
excelSheetName
Default: 'Sheet 1'string | ((excelSheetNameContext: BaseExportContext) => string)Notes
Notes are exported as cell comments, including the Note's Author.
Excel shows the same indicator for every comment, so the Note Type cannot be shown as a colour. Instead, when any Note has a type other than the default (noteOptions.defaultNoteType, Info unless changed), each exported comment starts with its type, e.g. Warning: Check this price.
If all Notes have the default type, the comment contains only the Note text.
Excel Column Types
AdapTable allows developers to define in AG Grid columns which have a particular Excel Data Type.
This ensures that Excel will render that column using the correct type.
Caution
- This only affects the behaviour in Excel for exported data
- There is no impact on how AdapTable (or AG Grid) renders the Column or formats the Cells
There are 4 types of Column Data Types supported:
numberExcelTypestringExcelTypedateExcelTypebooleanExcelType
These are configured using the cellClass property in the ColDef object (which is an array), e.g:
cellClass: ["stringExcelType"]Caution
This can very occasionally result in the column losing any formatting which it has been given in AdapTable
- In this example we configure 2 Columns with Excel Column Types:
Rating- has astringExcelTypePrice- has anumberExcelType
- Export to Excel and note that the
Pricecolumn is of type Number and theRatingcolumn shows all values as strings