csvwriter

Creator: coderz1093

Last updated:

0 purchases

csvwriter Image
csvwriter Images

Languages

Categories

Add to Cart

Description:

csvwriter

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();
}
}
copied to clipboard

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.