Home > OS >  While importing excel of data at approx 60,000, I need to show the progress bar in my blade view of
While importing excel of data at approx 60,000, I need to show the progress bar in my blade view of

Time:09-23

I am importing my data using maatwebsite sharing you snippet for it,

row['entrydate'] = \PhpOffice\PhpSpreadsheet\Shared\Date::excelToDateTimeObject($row['entrydate'])->format('Y-m-d');
Client::create($row);

This is importing file code, time at which this button is triggered I am directly calling my route and function which redirect to my above code.

I want to show the progress bar as per my data is importing from excel for ex: data consist of 1,00,000 reocords or 1,000 records, That progress is need to be displayed in Blade View in Laravel.

CodePudding user response:

I am also stuck with this and facing same issue while import excel using maatwebsite need to show progress-bar in html as per my own data ( I have approx 15 Million records). NEED HELP

CodePudding user response:

You can use Lottie Player.

View :

<lottie-player id = "loaderImg"
  autoplay
  controls
  loop
  mode="normal"
  src="https://assets3.lottiefiles.com/packages/lf20_UJNc2t.json"
  style="width: 320px"
>
</lottie-player>

If it is ajax request then you can use below code :

$(document).ajaxStart(function(){ 
   $("#loaderImg").css("display", "block"); 
});

If it is button action event :

$(document).on("click",".btnAction",function() {
   $("#loaderImg").css("display", "block"); 
});

CodePudding user response:

I'm facing same issue while importing... and also want to get number of imported rows from total number of rows of Excel during importing process. [Output: (1/100)1%,....,(100/100)100%]

  • Related