Exporting to Excel is a core feature in AG Grid, frequently used by our customers. In this post we'll review the major improvements in Excel export in AG Grid versions 25.2 and more recent.

Exporting Images

Exporting images is now fully supported - rendering the image in an Excel cell all by itself or together with text. You can find more information about this in our documentation and a live sample below:

Exporting formulas into Excel files is now fully supported. For any cell in AG Grid you can provide the formula value to be used when exporting that cell to Excel. This allows to export values as hyperlinks in the Excel export. You can find more information about this in our documentation and a live sample below:

Exporting into Multiple Sheets

Exporting grid data into multiple sheets of the same Excel file is now fully supported. You can create the sheets you need in the exported file and provide the content to be exported on each sheet. This is especially useful when you have different datasets that you'd like to keep on separate sheets but still packaged in the same Excel file. You can find more information about this in our documentation and a live sample below:

Exporting additional content

Starting with AG Grid 25.2 you can export additional content alongside AG Grid. You can add text and images on the same sheet alongside the AG Grid export, or on separate sheets to build a cover page. You can also set the header and footer content for the Excel workbook which is useful when printing, providing the document title, current page number, author on each page.

You can find more information about this in our documentation and a live sample below:

Exporting Date values

We've added support for exporting date values so these values are entered and formatted correctly as dates in Excel. You can find more information about this in our documentation and a live sample below:

Controlling Page Setup

If you're printing your Excel exports, it's helpful to be able to configure the page setup including the page size, orientation and margins. You can now do this to get files that are ready to be printed without any additional adjustments by the user. You can find more information about this in our documentation and a live sample below:

Summary

We hope you find this article useful to understand the rich export to Excel functionality available in AG Grid. There is significant additional export functionality I've not covered here such as exporting with styles, export settings for rows, columns and exporting master-detail grids.

This is why I would recommend looking for additional information and examples related to export to Excel in our documentation.

If you would like to try out ag-Grid check out our getting started guides (JS / React / Angular / Vue)

Happy coding!