excel_plus v2.14.3
pub.dev GitHub

An Excel library for Dart

Read, create, edit and style Microsoft Excel .xlsx spreadsheets from Dart, and read legacy .xls workbooks. No native dependencies, no Office install, no server round trip.

Install#

dart pub add excel_plus
import 'package:excel_plus/excel_plus.dart';

A first example#

final excel = Excel.createExcel();
final sheet = excel['Sheet1'];

sheet.updateCell(CellIndex.indexByString('A1'), TextCellValue('Product'));
sheet.updateCell(CellIndex.indexByString('B1'), TextCellValue('Price'));
sheet.updateCell(CellIndex.indexByString('A2'), TextCellValue('Notebook'));
sheet.updateCell(CellIndex.indexByString('B2'), DoubleCellValue(12.50));

File('report.xlsx').writeAsBytesSync(excel.save()!);

Guides#

What it supports#

  • Reading, creating and editing .xlsx, plus reading legacy .xls (Excel 97-2003)
  • All cell types: text, integers, doubles, booleans, dates, times and formulas
  • Fonts, fills, gradients, borders, alignment, rotation, text wrapping and merged ranges
  • Built in and custom number formats
  • Around 160 formula functions, with evaluation and incremental recalculation
  • Charts, sparklines, pivot tables, conditional formatting, data validation and autofilters
  • Hyperlinks, freeze panes, cell comments, images and Excel tables
  • CSV and TSV import and export

Where it runs#

Pure Dart, so it runs anywhere Dart does: the Dart VM, compiled executables, server code, mobile and desktop apps, and the browser through both JavaScript and WebAssembly. There is no dependency on a native Excel library or a headless Office process.