excel
excel copied to clipboard
Cannot found file download excel
Hi, i cannot found the files after download from emulator.
iam using : excel: ^2.0.0-null-safety-3 path_provider: ^2.0.9
this my function download code
void _Download() async {
var excel = Excel.createExcel();
Sheet sheetObject = excel['sheet1'];
CellStyle cellStyle = CellStyle(
backgroundColorHex: "#1AFF1A",
fontFamily: getFontFamily(FontFamily.Calibri));
cellStyle.underline = Underline.Single; // or Underline.Double
var cell = sheetObject.cell(CellIndex.indexByString("A1"));
cell.value = 8; // dynamic values support provided;
cell.cellStyle = cellStyle;
// printing cell-type
print("CellType: " + cell.cellType.toString());
///
/// Inserting and removing column and rows
// insert column at index = 8
sheetObject.insertColumn(8);
// remove column at index = 18
sheetObject.removeColumn(18);
// insert row at index = 82
sheetObject.insertRow(82);
// remove row at index = 80
sheetObject.removeRow(80);
var fileBytes = excel.save();
var directory = await getApplicationDocumentsDirectory();
print(directory.path);
File(join(directory.path + "/dongle.xlsx"))
..createSync(recursive: true)
..writeAsBytesSync(fileBytes!);
}
output for directory.path /data/user/0/com.example.myproject/app_flutter
Using Device file explorer
in Android Studio
Path: /data/data/com.example.myproject/app_flutter