JavaScript Data GridExcel Export API ReferenceEnterprise
This page documents the Excel Export API and Interfaces.
| A default configuration object used to export to Excel. | |
| Prevents the user from exporting the grid to Excel. Default: false | |
| A list (array) of Excel styles to be used when exporting to Excel with styles.
|
| Downloads an Excel export of the grid's data.
| |
| Similar to exportDataAsExcel , except instead of downloading a file, it will return a Blob to be processed by the user.
| |
| This is method to be used to get the grid's data as a sheet, that will later be exported either by getMultipleSheetsAsExcel() or exportMultipleSheetsAsExcel() .
| |
| Downloads an Excel export of multiple sheets in one file.
| |
| Similar to exportMultipleSheetsAsExcel , except instead of downloading a file, it will return a Blob to be processed by the user.
|
Properties available on the ExcelExportParams
interface.
| The author of the exported file. Default: "AG Grid" | |
| If set to true , this will try to convert any cell that starts with = to a formula, instead of setting the cell value as regular string that starts with = .Default: false
| |
| Defines the default column width. If no value is present, each column will have value currently set in the application with a min value of 75px. This property can also be supplied a callback function that returns a number.
| |
| For backwards compatibility, this property could be set to xml , which will export an Excel Spreadsheet compatible with old Office versions (prior to Office 2007). Setting this to xml is not recommended as some features will not work in legacy mode.Default: xlsx
| |
| The default value for the font size of the Excel document. Default: 11
| |
| The height in pixels of header rows. Defaults to Excel default value. This property can also be supplied a callback function that returns a number.
| |
| The height in pixels of all rows. Defaults to Excel default value. This property can also be supplied a callback function that returns a number.
| |
| The name of the sheet in Excel where the grid will be exported. There is a max limit of 31 characters. Default: ag-grid
| |
| The Excel document page margins. Relevant for printing.
| |
| Allows you to setup the page orientation and size.
| |
| The configuration for header and footers.
| |
| If true , text content will be encoded with XML character entities like < and > . This is only relevant when exportMode='xml' .Default: false
| |
| The mimeType of the Excel file. Note that this defaults to application/vnd.ms-excel if exportMode is xml .Default: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
| |
| Use to export an image for the gridCell in question.
| |
| Content to put at the bottom of the exported sheet. An array of ExcelRow objects, see Extra Content section.
| |
| Content to put at the top of the exported sheet. An array of ExcelRow objects, see Extra Content section.
| |
| A callback function to return content to be inserted below a row in the export.
| |
| If true , all columns will be exported in the order they appear in the columnDefs. When false only the columns currently being displayed will be exported.Default: false
| |
| Provide a list (an array) of column keys or Column objects if you want to export specific columns.
| |
| Row node positions.
| |
| String to use as the file name.
Default: 'export.xlsx' | |
| Determines whether rows are exported before being filtered and sorted. Default: filteredAndSorted
| |
| Export only selected rows. Default: false
| |
| Only export selected rows including other pages (only makes sense when using pagination). Default: false
| |
| Set to true to exclude header column groups.Default: false
| |
| Set to true if you don't want to export column headers.Default: false
| |
| Set to true to skip row group headers if grouping rows. Only relevant when grouping rows.Default: false
| |
| Set to true to suppress exporting rows pinned to the top of the grid.Default: false
| |
| Set to true to suppress exporting rows pinned to the bottom of the grid.Default: false
| |
| A callback function that will be invoked once per row in the grid. Return true to omit the row from the export.
| |
| A callback function invoked once per cell in the grid. Return a string value to be displayed in the export. For example this is useful for formatting date values.
| |
| A callback function invoked once per column. Return a string to be displayed in the column header.
| |
| A callback function invoked once per column group. Return a string to be displayed in the column group header. Note that column groups are exported by default, this option will not work with skipColumnGroupHeaders=true .
| |
| A callback function invoked once per row group. Return a string to be displayed in the group cell.
|
Properties available on the ExcelExportMultipleSheetParams
interface.
See Multiple Sheets for more information.
Properties available on the ExcelAlignment
interface.
Properties available on the ExcelBorders
interface.
Properties available on the ExcelBorder
interface.
Properties available on the ExcelCell
interface.
| The data that will be added to the cell.
| |
| Cell reference. | |
| Collapsible ranges. | |
| The ExcelStyle id to be associated with the cell. | |
| The number of cells to span across (1 means span 2 columns). Default: 0
|
Properties available on the ExcelData
interface.
Properties available on the ExcelFont
interface.
Properties available on the ExcelHeaderFooter
interface.
| An array of maximum 3 items ( Left , Center , Right ), containing header configurations.
| |
| An array of maximum 3 items ( Left , Center , Right ), containing footer configurations.
|
Properties available on the ExcelHeaderFooterContent
interface.
Properties available on the ExcelImage
interface.
| The image id . This field is required so the same image doesn't get imported multiple times.
| |
| A base64 string that represents the image being imported.
See Base64. | |
| The type of image being exported. | |
| Alt Text for the image. | |
| If set to true , the image will cover the whole cell that is being imported to.Default: false
| |
| Set a value between 0 - 100 that will indicate the percentage of transparency of the image. Default: 0
| |
| Set a value between 0 - 359 that will indicate the number of degrees to rotate the image clockwise. Default: 0
| |
| Set this property to select a preset that changes the appearance of the image. | |
| The width of the image in pixels. If this value is not selected, fitCell will be automatically set to true. | |
| The height of the image in pixels. If this value is not selected, fitCell will be automatically set to true. | |
| Position of the image.
|
Properties available on the ExcelImagePosition
interface.
Properties available on the ExcelInterior
interface.
Properties available on the ExcelNumberFormat
interface.
| Use this property to provide a pattern to format a number. (eg. 10000 could become $10,000.00). |
Properties available on the ExcelProtection
interface.
| Set to false to disable cell protection (locking)Default: true
| |
| Set to true to hide formulas within protected cells.Default: false
|
Properties available on the ExcelSheetMargin
interface.
Properties available on the ExcelSheetPageSetup
interface.
Properties available on the ExcelStyle
interface.
| The id of the Excel Style, this should match a CSS cell class. | |
| Use this property to customise cell alignment properties.
| |
| Use this property to customise cell borders.
| |
| Use this property to specify the type of data being exported.
| |
| Use this property to customise the font used in the cell. | |
| Use this property to customise the cell background.
| |
| Use this property to customise the cell value as a formatted number.
| |
| Use this property to setup cell protection.
|
type ExcelDataType =
'String' |
'Formula' |
'Number' |
'Boolean' |
'DateTime' |
'Error'
type ExcelOOXMLDataType =
'str' |
's' |
'f' |
'inlineStr' |
'n' |
'b' |
'd' |
'e' |
'empty'