Skip to content
Spreadsheet Decoder is a library for decoding spreadsheets for ODS and XLSX files.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin Implement & test updateCell for ODS Nov 18, 2017
example Add tests for insert/remove columns/rows Jan 8, 2018
lib Fix parsing on converted Numbers documents Feb 22, 2019
test Fix parsing on converted Numbers documents Feb 22, 2019
tool Fix warnings Jul 8, 2018
.gitignore Fix parsing on converted Numbers documents Feb 22, 2019
.travis.yml 1.0.1 Feb 22, 2019
CHANGELOG.md 1.0.1 Feb 22, 2019
LICENSE Initial commit Jan 2, 2016
README.md Add license in README.md Dec 20, 2017
pubspec.yaml 1.0.1 Feb 22, 2019

README.md

Spreadsheet Decoder

Build Status Coverage Status Pub version

Spreadsheet Decoder is a library for decoding and updating spreadsheets for ODS and XLSX files.

Usage

On server-side

import 'dart:io';
import 'package:spreadsheet_decoder/spreadsheet_decoder.dart';

main() {
  var bytes = new File.fromUri(fullUri).readAsBytesSync();
  var decoder = new SpreadsheetDecoder.decodeBytes(bytes);
  var table = decoder.tables['Sheet1'];
  var values = table.rows[0];
  ...
  decoder.updateCell('Sheet1', 0, 0, 1337);
  new File(join(fullUri).writeAsBytesSync(decoder.encode());
  ...
}

On client-side

import 'dart:html';
import 'package:spreadsheet_decoder/spreadsheet_decoder.dart';

main() {
  var reader = new FileReader();
  reader.onLoadEnd.listen((event) {
    var decoder = new SpreadsheetDecoder.decodeBytes(reader.result);
    var table = decoder.tables['Sheet1'];
    var values = table.rows[0];
    ...
    decoder.updateCell('Sheet1', 0, 0, 1337);
    var bytes = decoder.encode();
    ...
  });
}

Features not yet supported

This implementation doesn't support following features:

  • annotations
  • spanned rows
  • spanned columns
  • hidden rows (visible in resulting tables)
  • hidden columns (visible in resulting tables)

For XLSX format, this implementation only supports native Excel format for date, time and boolean type conversion. In other words, custom format for date, time, boolean aren't supported and then file exported from LibreOffice as well.

License

The MIT License, see LICENSE.

You can’t perform that action at this time.