csvwriter 1.3.0 copy "csvwriter: ^1.3.0" to clipboard
csvwriter: ^1.3.0 copied to clipboard

Lightweight, cross-platform Dart package to write CSV data to a `StringSink`. Supports and extends RFC 4180.

csvwriter #

Lightweight, cross-platform Dart package to write CSV data to a StringSink. Supports and extends RFC 4180.

Usage #

import 'dart:io';

import 'package:csvwriter/csvwriter.dart';

void main() async {
  var numbersFile = File('number_props.csv');
  var numbersCsv = CsvWriter.withHeaders(numbersFile.openWrite(), ['Number', 'Odd?', 'Even?']);

  try {
    for (var i = 0; i < 100; i++) {
      numbersCsv.writeData(data: {'Number': i, 'Odd?': (i % 2) != 0, 'Even?': (i % 2) == 0});
    }
  } finally {
      await numbersCsv.close();
  }
}
7
likes
140
pub points
88%
popularity

Publisher

unverified uploader

Lightweight, cross-platform Dart package to write CSV data to a `StringSink`. Supports and extends RFC 4180.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

More

Packages that depend on csvwriter