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

A Flutter package to generate Excel files from arrays and allow users to save or share the file on Android, iOS, Web, and Desktop.

arrayToExcel #

A Flutter package to easily generate Excel files from arrays of headings and data, and allow users to save or share the file on Android, iOS, Web, and Desktop platforms.

Features #

  • Generate Excel files from a list of headings and data rows
  • Save the Excel file to a user-selected location (mobile, desktop, web)
  • Share the Excel file using the platform share dialog (mobile, desktop)

Supported Platforms #

  • Android
  • iOS
  • Web (save only, sharing not supported)
  • Windows
  • macOS
  • Linux

Usage #

import 'package:arrayToExcel/arrayToExcel.dart';
import 'dart:typed_data';

final headings = ['Name', 'Age', 'Country'];
final data = [
  ['Alice', 30, 'USA'],
  ['Bob', 25, 'UK'],
  ['Charlie', 28, 'Canada'],
];

// Generate Excel bytes
final bytes = ArrayToExcel.generateExcel(headings: headings, data: data);

if (bytes != null) {
  // Save the file
  await ArrayToExcel.saveExcelFile(bytes: bytes, fileName: 'people.xlsx');

  // Or share the file
  await ArrayToExcel.shareExcelFile(bytes: bytes, fileName: 'people.xlsx');
}

Example #

See the example/ directory for a complete usage example.

License #

MIT

3
likes
140
points
39
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter package to generate Excel files from arrays and allow users to save or share the file on Android, iOS, Web, and Desktop.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

excel, file_picker, flutter, path_provider, share_plus

More

Packages that depend on array_to_excel