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

outdated

Lightweight Dart package to write CSV data to a StringSink. Supports and extends RFC 4180.

csvwriter #

Lightweight 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();
  }
}
8
likes
0
pub points
83%
popularity

Publisher

unverified uploader

Lightweight Dart package to write CSV data to a StringSink. Supports and extends RFC 4180.

Repository (GitHub)
View/report issues

License

unknown (license)

More

Packages that depend on csvwriter