{
    "componentChunkName": "component---src-templates-doc-page-jsx",
    "path": "/angular-data-grid/excel-export/",
    "result": {"data":{"markdownRemark":{"htmlAst":{"type":"element","tagName":"div","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The grid provides in-built Excel (xlsx) export functionality without the need for any third party libraries. Exporting to\nExcel can be performed from the "},{"type":"element","tagName":"a","properties":{"href":"../context-menu/"},"children":[{"type":"text","value":"Context Menu"}]},{"type":"text","value":" or programmatically via the "},{"type":"element","tagName":"a","properties":{"href":"../grid-api/"},"children":[{"type":"text","value":"Grid API"}]},{"type":"text","value":" and\nthe exported spreadsheets can be fully customised and styled to meet user requirements."}]},{"type":"element","tagName":"div","properties":{},"children":[{"type":"element","tagName":"image-caption","properties":{"src":"excel-export/resources/excel-export-context-menu.png","alt":"Excel Export","maxwidth":"48rem","constrained":"true","centered":"true"},"children":[]}]},{"type":"element","tagName":"h2","properties":{"id":"enabling-excel-export","style":"position:relative;"},"children":[{"type":"element","tagName":"a","properties":{"href":"#enabling-excel-export","ariaLabel":"enabling excel export permalink","className":["anchor","before"]},"children":[{"type":"element","tagName":"svg","properties":{"ariaHidden":"true","focusable":"false","dataPrefix":"fas","dataIcon":"link","className":["svg-inline--fa","fa-link"],"role":"img","xmlns":"http://www.w3.org/2000/svg","viewBox":"0 0 512 512"},"children":[{"type":"element","tagName":"path","properties":{"fill":"currentColor","d":"M326.612 185.391c59.747 59.809 58.927 155.698.36 214.59-.11.12-.24.25-.36.37l-67.2 67.2c-59.27 59.27-155.699 59.262-214.96 0-59.27-59.26-59.27-155.7 0-214.96l37.106-37.106c9.84-9.84 26.786-3.3 27.294 10.606.648 17.722 3.826 35.527 9.69 52.721 1.986 5.822.567 12.262-3.783 16.612l-13.087 13.087c-28.026 28.026-28.905 73.66-1.155 101.96 28.024 28.579 74.086 28.749 102.325.51l67.2-67.19c28.191-28.191 28.073-73.757 0-101.83-3.701-3.694-7.429-6.564-10.341-8.569a16.037 16.037 0 0 1-6.947-12.606c-.396-10.567 3.348-21.456 11.698-29.806l21.054-21.055c5.521-5.521 14.182-6.199 20.584-1.731a152.482 152.482 0 0 1 20.522 17.197zM467.547 44.449c-59.261-59.262-155.69-59.27-214.96 0l-67.2 67.2c-.12.12-.25.25-.36.37-58.566 58.892-59.387 154.781.36 214.59a152.454 152.454 0 0 0 20.521 17.196c6.402 4.468 15.064 3.789 20.584-1.731l21.054-21.055c8.35-8.35 12.094-19.239 11.698-29.806a16.037 16.037 0 0 0-6.947-12.606c-2.912-2.005-6.64-4.875-10.341-8.569-28.073-28.073-28.191-73.639 0-101.83l67.2-67.19c28.239-28.239 74.3-28.069 102.325.51 27.75 28.3 26.872 73.934-1.155 101.96l-13.087 13.087c-4.35 4.35-5.769 10.79-3.783 16.612 5.864 17.194 9.042 34.999 9.69 52.721.509 13.906 17.454 20.446 27.294 10.606l37.106-37.106c59.271-59.259 59.271-155.699.001-214.959z"},"children":[]}]}]},{"type":"text","value":"Enabling Excel Export"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The enterprise version of the grid provides an 'Excel Export' option via the grids "},{"type":"element","tagName":"a","properties":{"href":"../context-menu/"},"children":[{"type":"text","value":"Context Menu"}]},{"type":"text","value":" by default. (If you are using Enterprise "},{"type":"element","tagName":"a","properties":{"href":"../modules/"},"children":[{"type":"text","value":"Modules"}]},{"type":"text","value":" ensure the "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"ExcelExportModule"}]},{"type":"text","value":" is registered.)"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Excel export is also possible via the "},{"type":"element","tagName":"a","properties":{"href":"../grid-api/"},"children":[{"type":"text","value":"Grid API"}]},{"type":"text","value":" using the following method: "}]},{"type":"element","tagName":"snippet","properties":{},"children":[{"type":"text","value":"\n gridOptions.api.exportDataAsExcel();\n"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"No special configurations or third party libraries are required for either approach."}]},{"type":"element","tagName":"h2","properties":{"id":"default-excel-export","style":"position:relative;"},"children":[{"type":"element","tagName":"a","properties":{"href":"#default-excel-export","ariaLabel":"default excel export permalink","className":["anchor","before"]},"children":[{"type":"element","tagName":"svg","properties":{"ariaHidden":"true","focusable":"false","dataPrefix":"fas","dataIcon":"link","className":["svg-inline--fa","fa-link"],"role":"img","xmlns":"http://www.w3.org/2000/svg","viewBox":"0 0 512 512"},"children":[{"type":"element","tagName":"path","properties":{"fill":"currentColor","d":"M326.612 185.391c59.747 59.809 58.927 155.698.36 214.59-.11.12-.24.25-.36.37l-67.2 67.2c-59.27 59.27-155.699 59.262-214.96 0-59.27-59.26-59.27-155.7 0-214.96l37.106-37.106c9.84-9.84 26.786-3.3 27.294 10.606.648 17.722 3.826 35.527 9.69 52.721 1.986 5.822.567 12.262-3.783 16.612l-13.087 13.087c-28.026 28.026-28.905 73.66-1.155 101.96 28.024 28.579 74.086 28.749 102.325.51l67.2-67.19c28.191-28.191 28.073-73.757 0-101.83-3.701-3.694-7.429-6.564-10.341-8.569a16.037 16.037 0 0 1-6.947-12.606c-.396-10.567 3.348-21.456 11.698-29.806l21.054-21.055c5.521-5.521 14.182-6.199 20.584-1.731a152.482 152.482 0 0 1 20.522 17.197zM467.547 44.449c-59.261-59.262-155.69-59.27-214.96 0l-67.2 67.2c-.12.12-.25.25-.36.37-58.566 58.892-59.387 154.781.36 214.59a152.454 152.454 0 0 0 20.521 17.196c6.402 4.468 15.064 3.789 20.584-1.731l21.054-21.055c8.35-8.35 12.094-19.239 11.698-29.806a16.037 16.037 0 0 0-6.947-12.606c-2.912-2.005-6.64-4.875-10.341-8.569-28.073-28.073-28.191-73.639 0-101.83l67.2-67.19c28.239-28.239 74.3-28.069 102.325.51 27.75 28.3 26.872 73.934-1.155 101.96l-13.087 13.087c-4.35 4.35-5.769 10.79-3.783 16.612 5.864 17.194 9.042 34.999 9.69 52.721.509 13.906 17.454 20.446 27.294 10.606l37.106-37.106c59.271-59.259 59.271-155.699.001-214.959z"},"children":[]}]}]},{"type":"text","value":"Default Excel Export"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The default Excel export behaviour will export the grid as it is currently rendered. This means the exported spreadsheet will match what is displayed in the grid at the time of export following any sorting, filtering, row grouping, columns visible, grouped columns etc..."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Note that the raw values, and not the result from a cell renderer will be used, meaning the results from:"}]},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Value Getters will be used. "}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Cell Renderers / Formatters will "},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"NOT"}]},{"type":"text","value":" be used. "}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Cell styles will "},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"NOT"}]},{"type":"text","value":" be exported by default. "}]},{"type":"text","value":"\n"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"In the following example reorder some columns and apply some filter and sort operations - then export from the 'Excel Export' option\nin the context menu, or the 'Export to Excel' button provided. Note the following:"}]},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"The current order of the columns is exported and any hidden columns will not be exported."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Filtered out rows are not included in the export, and the sort order is maintained."}]},{"type":"text","value":"\n"}]},{"type":"element","tagName":"div","properties":{},"children":[{"type":"element","tagName":"grid-example","properties":{"title":"Default Excel Export","name":"excel-default-export","type":"generated","options":"{ \"enterprise\": true, \"modules\": [\"clientside\", \"csv\", \"excel\", \"menu\"], \"exampleHeight\": 600 }"},"children":[]}]},{"type":"element","tagName":"div","properties":{"className":["custom-block","note"]},"children":[{"type":"element","tagName":"div","properties":{"className":["custom-block-body"]},"children":[{"type":"element","tagName":"ol","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"The column width in Excel will be the same as the actual width of the column in the application at the time that the export happens, or 75px, whichever is wider. \"Actual width\" may be different from the width in the column definition if column has been resized or uses flex sizing. This can be overridden using the "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"columnWidth"}]},{"type":"text","value":" export parameter."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"The data types of your columns are passed to Excel as part of the export so that you can work with the data within Excel in the correct format."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"The cells of the column header groups are merged in the same manner as the group headers in AG Grid."}]},{"type":"text","value":"\n"}]}]}]},{"type":"element","tagName":"h2","properties":{"id":"custom-excel-export","style":"position:relative;"},"children":[{"type":"element","tagName":"a","properties":{"href":"#custom-excel-export","ariaLabel":"custom excel export permalink","className":["anchor","before"]},"children":[{"type":"element","tagName":"svg","properties":{"ariaHidden":"true","focusable":"false","dataPrefix":"fas","dataIcon":"link","className":["svg-inline--fa","fa-link"],"role":"img","xmlns":"http://www.w3.org/2000/svg","viewBox":"0 0 512 512"},"children":[{"type":"element","tagName":"path","properties":{"fill":"currentColor","d":"M326.612 185.391c59.747 59.809 58.927 155.698.36 214.59-.11.12-.24.25-.36.37l-67.2 67.2c-59.27 59.27-155.699 59.262-214.96 0-59.27-59.26-59.27-155.7 0-214.96l37.106-37.106c9.84-9.84 26.786-3.3 27.294 10.606.648 17.722 3.826 35.527 9.69 52.721 1.986 5.822.567 12.262-3.783 16.612l-13.087 13.087c-28.026 28.026-28.905 73.66-1.155 101.96 28.024 28.579 74.086 28.749 102.325.51l67.2-67.19c28.191-28.191 28.073-73.757 0-101.83-3.701-3.694-7.429-6.564-10.341-8.569a16.037 16.037 0 0 1-6.947-12.606c-.396-10.567 3.348-21.456 11.698-29.806l21.054-21.055c5.521-5.521 14.182-6.199 20.584-1.731a152.482 152.482 0 0 1 20.522 17.197zM467.547 44.449c-59.261-59.262-155.69-59.27-214.96 0l-67.2 67.2c-.12.12-.25.25-.36.37-58.566 58.892-59.387 154.781.36 214.59a152.454 152.454 0 0 0 20.521 17.196c6.402 4.468 15.064 3.789 20.584-1.731l21.054-21.055c8.35-8.35 12.094-19.239 11.698-29.806a16.037 16.037 0 0 0-6.947-12.606c-2.912-2.005-6.64-4.875-10.341-8.569-28.073-28.073-28.191-73.639 0-101.83l67.2-67.19c28.239-28.239 74.3-28.069 102.325.51 27.75 28.3 26.872 73.934-1.155 101.96l-13.087 13.087c-4.35 4.35-5.769 10.79-3.783 16.612 5.864 17.194 9.042 34.999 9.69 52.721.509 13.906 17.454 20.446 27.294 10.606l37.106-37.106c59.271-59.259 59.271-155.699.001-214.959z"},"children":[]}]}]},{"type":"text","value":"Custom Excel Export"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The "},{"type":"element","tagName":"a","properties":{"href":"../excel-export/#default-excel-export"},"children":[{"type":"text","value":"Default Excel Export"}]},{"type":"text","value":" behaviour will meet the requirements of most applications. However, you can apply extensive customisation to the values exported, layout, value formatting and styling of the exported spreadsheets."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The sections below cover the various ways the exported Excel spreadsheets can be customised:"}]},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"../excel-export-styles/"},"children":[{"type":"text","value":"Styles"}]}]},{"type":"text","value":": Apply custom styling to exported spreadsheets"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"../excel-export-formulas/"},"children":[{"type":"text","value":"Formulas"}]}]},{"type":"text","value":": Export the grid's value getters to Excel formulas"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"../excel-export-extra-content/"},"children":[{"type":"text","value":"Extra Content"}]}]},{"type":"text","value":": Add to the exported spreadsheets extra content not shown in the grid"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"../excel-export-images/"},"children":[{"type":"text","value":"Images"}]}]},{"type":"text","value":": Export images as extra content or within grid cells"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"../excel-export-multiple-sheets/"},"children":[{"type":"text","value":"Multiple Sheets"}]}]},{"type":"text","value":": Export grid data across multiple sheets of an Excel workbook"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"../excel-export-rows/"},"children":[{"type":"text","value":"Rows"}]}]},{"type":"text","value":": Set which rows are exported"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"../excel-export-columns/"},"children":[{"type":"text","value":"Columns"}]}]},{"type":"text","value":": Set which columns are exported"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"../excel-export-data-types/"},"children":[{"type":"text","value":"Data Types"}]}]},{"type":"text","value":":  Export grid values to the Excel built-in data types."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"../excel-export-hyperlinks/"},"children":[{"type":"text","value":"Hyperlinks"}]}]},{"type":"text","value":": Add hyperlinks to exported spreadsheets."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"../excel-export-master-detail/"},"children":[{"type":"text","value":"Master Detail"}]}]},{"type":"text","value":": Export master detail grids to single or multiple sheets"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"../excel-export-page-setup/"},"children":[{"type":"text","value":"Page Setup"}]}]},{"type":"text","value":": Customize the page setup of the exported spreadsheets"}]},{"type":"text","value":"\n"}]},{"type":"element","tagName":"h2","properties":{"id":"next-up","style":"position:relative;"},"children":[{"type":"element","tagName":"a","properties":{"href":"#next-up","ariaLabel":"next up permalink","className":["anchor","before"]},"children":[{"type":"element","tagName":"svg","properties":{"ariaHidden":"true","focusable":"false","dataPrefix":"fas","dataIcon":"link","className":["svg-inline--fa","fa-link"],"role":"img","xmlns":"http://www.w3.org/2000/svg","viewBox":"0 0 512 512"},"children":[{"type":"element","tagName":"path","properties":{"fill":"currentColor","d":"M326.612 185.391c59.747 59.809 58.927 155.698.36 214.59-.11.12-.24.25-.36.37l-67.2 67.2c-59.27 59.27-155.699 59.262-214.96 0-59.27-59.26-59.27-155.7 0-214.96l37.106-37.106c9.84-9.84 26.786-3.3 27.294 10.606.648 17.722 3.826 35.527 9.69 52.721 1.986 5.822.567 12.262-3.783 16.612l-13.087 13.087c-28.026 28.026-28.905 73.66-1.155 101.96 28.024 28.579 74.086 28.749 102.325.51l67.2-67.19c28.191-28.191 28.073-73.757 0-101.83-3.701-3.694-7.429-6.564-10.341-8.569a16.037 16.037 0 0 1-6.947-12.606c-.396-10.567 3.348-21.456 11.698-29.806l21.054-21.055c5.521-5.521 14.182-6.199 20.584-1.731a152.482 152.482 0 0 1 20.522 17.197zM467.547 44.449c-59.261-59.262-155.69-59.27-214.96 0l-67.2 67.2c-.12.12-.25.25-.36.37-58.566 58.892-59.387 154.781.36 214.59a152.454 152.454 0 0 0 20.521 17.196c6.402 4.468 15.064 3.789 20.584-1.731l21.054-21.055c8.35-8.35 12.094-19.239 11.698-29.806a16.037 16.037 0 0 0-6.947-12.606c-2.912-2.005-6.64-4.875-10.341-8.569-28.073-28.073-28.191-73.639 0-101.83l67.2-67.19c28.239-28.239 74.3-28.069 102.325.51 27.75 28.3 26.872 73.934-1.155 101.96l-13.087 13.087c-4.35 4.35-5.769 10.79-3.783 16.612 5.864 17.194 9.042 34.999 9.69 52.721.509 13.906 17.454 20.446 27.294 10.606l37.106-37.106c59.271-59.259 59.271-155.699.001-214.959z"},"children":[]}]}]},{"type":"text","value":"Next Up"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Continue to the next section: "},{"type":"element","tagName":"a","properties":{"href":"../excel-export-api/"},"children":[{"type":"text","value":"API Reference"}]},{"type":"text","value":"."}]}]},"frontmatter":{"title":"Excel Export","version":null,"enterprise":true,"description":null},"headings":[{"id":"enabling-excel-export","depth":2,"value":"Enabling Excel Export"},{"id":"default-excel-export","depth":2,"value":"Default Excel Export"},{"id":"custom-excel-export","depth":2,"value":"Custom Excel Export"},{"id":"next-up","depth":2,"value":"Next Up"}]}},"pageContext":{"frameworks":["javascript","react","angular","vue"],"framework":"angular","srcPath":"/excel-export","pageName":"excel-export"}},
    "staticQueryHashes": ["1766026005","699667431","940729948"]}