Skip to content
pubscout

syncfusion_flutter_datagrid_export

35.2.12, released 3 days ago by syncfusion.com

Export Syncfusion Flutter DataGrid content to Excel and PDF formats

WASM-readyUses material_ui
$ flutter pub add syncfusion_flutter_datagrid_export
Source repository

What it does

The Syncfusion Flutter DataGrid Export library allows developers to export DataGrid contents such as headers, rows, stacked headers, and table summary rows into Excel and PDF formats with various customization options. It integrates with a GlobalKey attached to the SfDataGrid widget to trigger export methods.

AI-written summary of version 35.1.43, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to export tabular data displayed in a Syncfusion DataGrid to Excel spreadsheets or PDF documents.
  • Your application requires generating reports or downloadable files from grid content.

Skip it when

  • You are not using the Syncfusion Flutter DataGrid widget.
  • You need to export standard Flutter tables or widgets other than SfDataGrid.

Strengths

  • Supports exporting headers, rows, stacked headers, and table summary rows.
  • Provides direct methods to output to both Excel workbooks and PDF documents.

Weaknesses

  • Commercial package requiring a Syncfusion commercial or Community License.
  • Strictly tied to the syncfusion_flutter_datagrid package.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
6

Requires a valid Syncfusion commercial license or free Community License. Import syncfusion_flutter_datagrid_export/export.dart and attach a GlobalKey<SfDataGridState> to the SfDataGrid widget.

Future<void> exportDataGridToExcel() async {
  final Workbook workbook = _key.currentState!.exportToExcelWorkbook();
  final List<int> bytes = workbook.saveAsStream();
  File('DataGrid.xlsx').writeAsBytes(bytes);
  workbook.dispose();
}

Alternatives

Packages that do the same job and could replace syncfusion_flutter_datagrid_export.

Works with

Packages commonly used together with syncfusion_flutter_datagrid_export: ones it builds on, ones built on it, and its own family.