Skip to content
pubscout

excel_to_json

2.0.0, released 2 weeks ago by vitormelo.dev.br

Convert Excel (.xlsx) and CSV spreadsheets to JSON or Dart maps in pure Dart.

WASM-ready
$ flutter pub add excel_to_json
Source repository

What it does

Reads Excel and CSV spreadsheet files and converts them into Dart maps or JSON strings. It handles formula results, real dates, merged cells, custom header rows, and column key formatting without needing platform-specific plugins.

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

Use it when

  • You need to import or parse Excel or CSV data in a pure Dart environment, CLI, server, or Flutter app.
  • You need formula results or proper date/time parsing from spreadsheet files.
  • You want to convert spreadsheet sheets into JSON without third-party native dependencies.

Skip it when

  • You need to read legacy `.xls` or `.ods` files.
  • You need to read images, comments, or cell formatting/colors rather than raw values.

Strengths

  • Pure Dart with no platform plugins or native dependencies, supporting all platforms including web and desktop.
  • Automatically detects CSV delimiter, encoding, and handles formula results and merged cells.
  • Provides memory-efficient streaming XML parsing for large spreadsheets.

Weaknesses

  • Does not support legacy `.xls` or `.ods` file formats.
  • Ignores styling, images, and comments.

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
2
import 'package:excel_to_json/excel_to_json.dart';

final json = const ExcelToJson().toJson(bytes);

Alternatives

Packages that do the same job and could replace excel_to_json.

Works with

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