0
import 'dart:convert';
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:excel/excel.dart';
import 'package:http/http.dart' as http;

void main() {
  runApp(ExcelFirebase());
}

class ExcelFirebase extends StatelessWidget {
  var bytes = File(      '/Users/krishuagarwal/Desktop/Programming/Flutter/Playground/excel_flutter_work/lib/data.xlsx').readAsBytesSync();

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: Center(
          child: ElevatedButton(
            child: Text("Creation"),
            onPressed: () {},
          ),
        ),
      ),
    );
  }
}

I am not able to open the file on macos, i tried using the command chmod to grant permission and printing the file path to but it doesn't happen. Please help me.

0 Answers0