readAllExcelSheets static method

Future<Map<String, DataFrame>> readAllExcelSheets(
  1. String path, {
  2. bool hasHeader = true,
  3. int? skipRows,
  4. int? maxRows,
  5. List<String>? columnNames,
  6. Map<String, dynamic>? options,
})

Reads all sheets from an Excel file and returns a Map of sheet names to DataFrames

This is useful when you want to read an entire Excel workbook at once. Returns a Map where keys are sheet names and values are DataFrames.

Example:

final sheets = await FileReader.readAllExcelSheets('data.xlsx');
print('Available sheets: ${sheets.keys}');

// Access individual sheets
final salesData = sheets['Sales'];
final inventoryData = sheets['Inventory'];

// Process all sheets
for (final entry in sheets.entries) {
  print('Sheet: ${entry.key}, Rows: ${entry.value.shape.rows}');
}

Implementation

static Future<Map<String, DataFrame>> readAllExcelSheets(
  String path, {
  bool hasHeader = true,
  int? skipRows,
  int? maxRows,
  List<String>? columnNames,
  Map<String, dynamic>? options,
}) async {
  return ExcelFileReader.readAllSheets(
    path,
    hasHeader: hasHeader,
    skipRows: skipRows,
    maxRows: maxRows,
    columnNames: columnNames,
    options: options,
  );
}