spreadsheet_decoder 1.0.0

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 87

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.

1.0.0

Dart 2 support

0.4.3

Upgrade to xml 3.0.0

0.4.3-alpha

Add insert/remove columns/rows

0.4.2-alpha

Add extension getter

0.4.2-alpha

Add mediaType getter

0.4.0-alpha

Add updateCell method to update existing cells content

0.3.2

Fix string parsing on xlsx file Fix sheet target selection

0.3.1

Fix misalignment of decoded value with empty columns

0.3.0

Output typed data (number, string, date, time, boolean)

0.2.0

Add XLSX decoder

0.1.0

Add ODS decoder

0.0.1

Initial release

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  spreadsheet_decoder: ^1.0.0

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

Alternatively, your editor might support pub get or flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:spreadsheet_decoder/spreadsheet_decoder.dart';
  
Version Uploaded Documentation Archive
1.0.0 Jul 8, 2018 Go to the documentation of spreadsheet_decoder 1.0.0 Download spreadsheet_decoder 1.0.0 archive
0.4.3 Apr 17, 2018 Go to the documentation of spreadsheet_decoder 0.4.3 Download spreadsheet_decoder 0.4.3 archive
0.3.2 Dec 17, 2016 Go to the documentation of spreadsheet_decoder 0.3.2 Download spreadsheet_decoder 0.3.2 archive
0.3.1 Aug 31, 2016 Go to the documentation of spreadsheet_decoder 0.3.1 Download spreadsheet_decoder 0.3.1 archive
0.3.0 Jan 4, 2016 Go to the documentation of spreadsheet_decoder 0.3.0 Download spreadsheet_decoder 0.3.0 archive
0.2.0 Jan 3, 2016 Go to the documentation of spreadsheet_decoder 0.2.0 Download spreadsheet_decoder 0.2.0 archive
0.4.3-alpha Jan 8, 2018 Go to the documentation of spreadsheet_decoder 0.4.3-alpha Download spreadsheet_decoder 0.4.3-alpha archive
0.4.2-alpha Dec 20, 2017 Go to the documentation of spreadsheet_decoder 0.4.2-alpha Download spreadsheet_decoder 0.4.2-alpha archive
0.4.1-alpha Dec 20, 2017 Go to the documentation of spreadsheet_decoder 0.4.1-alpha Download spreadsheet_decoder 0.4.1-alpha archive
0.4.0-alpha Dec 20, 2017 Go to the documentation of spreadsheet_decoder 0.4.0-alpha Download spreadsheet_decoder 0.4.0-alpha archive
Popularity:
Describes how popular the package is relative to other packages. [more]
74
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
87
Learn more about scoring.

We analyzed this package on Aug 10, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0
  • pana: 0.11.8

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in primary library package:spreadsheet_decoder/spreadsheet_decoder.dart.

Suggestions

The description is too short.

Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

Maintain an example.

None of the files in your example/ directory matches a known example patterns. Common file name patterns include: main.dart, example.dart or you could also use spreadsheet_decoder.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.67.0 <3.0.0
archive ^2.0.0 2.0.2
xml ^3.0.0 3.2.0
Transitive dependencies
args 1.5.0
charcode 1.1.2
collection 1.14.11
convert 2.0.2
crypto 2.0.6
petitparser 2.0.0
typed_data 1.1.6
Dev dependencies
path ^1.5.1 1.6.2
test ^1.2.0