Home > Software engineering >  How to listen how many bytes written to storage while saving excel file in syncfusion_flutter_xlsio?
How to listen how many bytes written to storage while saving excel file in syncfusion_flutter_xlsio?

Time:05-21

I am using syncfusion_flutter_xlsio library for generating excel file and saving it. When my data is so big I have to present progress. How can I perform it?

Workbook workbook = Workbook();
var sheet = workbook.worksheets[0];
      sheet.getRangeByIndex(1, 1)
        ..setText('№')
        ..cellStyle.bold = true;
      sheet.getRangeByIndex(1, 2)
        ..setText('Наименование')
        ..columnWidth = 20
        ..cellStyle.bold = true;
      sheet.getRangeByIndex(1, 3)
        ..setText('Sku')
        ..columnWidth = 20
        ..cellStyle.bold = true;
      sheet.getRangeByIndex(1, 4)
        ..setText('Barcode')
        ..columnWidth = 20
        ..cellStyle.bold = true;
      sheet.getRangeByIndex(1, 5)
        ..setText('Shortage')
        ..columnWidth = 20
        ..cellStyle.bold = true;
      for (int i = 0; i < products.length; i  ) {
        // I am going to put product properties to excel cell here
      }
      List<int> bytes = workbook.saveAsStream();
      workbook.dispose();

Most heavy point is List<int> bytes = workbook.saveAsStream(); I need to listen to it. But how ?

CodePudding user response:

Greetings from Syncfusion.

Unfortunately, Flutter XlsIO does not have support for providing the status/progress of Excel document creation. And, we don’t have any plans to implement this feature.

Regards, Ramya.

  • Related