Step 1: First, add the syncfusion_flutter_datagrid_export package as a dependency in your pubspec. yaml file. Step 3: Now, add the Flutter DataGrid with two buttons: one for exporting to Excel, and another for exporting to PDF format. Refer to the following code.