GitXplorerGitXplorer
s

spreadsheet_decoder

public
55 stars
21 forks
19 issues

Commits

List of commits on branch master.
Verified
f35df311a48d690fcf4bc2da1381da354d73970b

Fix missing upgrade

ssestegra committed 4 months ago
Verified
1ab4169819c1537edada93863f5c455a7143166c

Update dependencies

ssestegra committed 4 months ago
Verified
480af690606e8daf4d1aa92e62d76c8148e84da2

Merge pull request #51 from YashvardhanKumar/master

ssestegra committed 4 months ago
Verified
b7673754e4351b05d992d675cab7a89e20c5784a

Fixed Method not found: 'UnmodifiableUint8ListView'

YYashvardhanKumar committed 5 months ago
Verified
389bf8ada00bb184ee4686aa63349ccfb699a443

Update changelog

ssestegra committed 2 years ago
Verified
a96d645e4217d2d67a86e9e4a31701158d3aac92

2.2.0

ssestegra committed 2 years ago

README

The README file for this repository.

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 = File.fromUri(fullUri).readAsBytesSync();
  var decoder = SpreadsheetDecoder.decodeBytes(bytes);
  var table = decoder.tables['Sheet1'];
  var values = table.rows[0];
  ...
  decoder.updateCell('Sheet1', 0, 0, 1337);
  File(join(fullUri).writeAsBytesSync(decoder.encode());
  ...
}

On client-side

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

main() {
  var reader = FileReader();
  reader.onLoadEnd.listen((event) {
    var decoder = 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.