20
Views
12
Comments
Solved
Unable to read large excel file
Question

Greetings,

i have an excel containing 10k record , when I am populating my db It is showing connection time out error . is their a way to read large excel file in reactive web app.

Thanks in advance, 


mvp_badge
MVP
Rank: #59
Solution

Hi Anand,

Please find attached Timer example.

There is sample excel file in the resources , please download it and upload it to see how it is being processed.

By default the timeout for Timer is 20 minutes and BPT activity is 5 minutes . You can decide what best suites fro you and then can take the implementation decision.


Regards,

-PJ-


DataProcessor.oml

Rank: #531

Hey Anand Kumar,

Are you uploading that excel in a screen or are you doing it with a bootstrap?


Best Regards,

Jose Torrao

mvp_badge
MVP
Rank: #59

Hi Anand,

In such cases where you have large data to process , the best approach is to process the file using Timers .


The step includes , 

1. Allow user to upload file from front end.

2.Store file in some db entities.

3.Launch your timer and timer will pick the uploaded file from db and do the processing.

4.Build some logic to auto refresh your screen so that as soon as data start processing user can see the data loading the screen.


Regrads,

-PJ-


Rank: #604

Hi Anand,

You can create a process to create a record in DB from the Xcel file, so that will run in the backend will not give Timeout error as well and Launch that process after uploading Excel from Screen

hope that will help you

Regards,

Krushna

mvp_badge
MVP
Rank: #59

Hi Anand,

In Outsystems you can create Timer to perform bulk operations or to handle long running jobs. You can write any logic within timers.

Now to better understand it .

1. You uploaded the file and store it in a entity called CustomerData (for ex.)

2. Now you create a timer in Outsystems and write the logic to read the excel file from the above entity.

3. Use the same logic in Timer which you were using on screen to process the excel data .


Now when your user uploads the file you just need to save it in the database and then launch the timer action , the time will start executing in the background and the data will start processing/inserting in the desired entity as per your code.


Regards,

-PJ-

mvp_badge
MVP
Rank: #59
Solution

Hi Anand,

Please find attached Timer example.

There is sample excel file in the resources , please download it and upload it to see how it is being processed.

By default the timeout for Timer is 20 minutes and BPT activity is 5 minutes . You can decide what best suites fro you and then can take the implementation decision.


Regards,

-PJ-


DataProcessor.oml

mvp_badge
MVP
Rank: #59

Hi Anand,

Where are you getting this error ? While processing the records?

There is one option to increase the timer timeout or follow another approach where you reinvoke  the timer once it’s timed out and start from where the timeout occurred last time.

Regards,

-PJ-

mvp_badge
MVP
Rank: #59

Hi Anand,

I will also suggest to go through the below tutorial to know the Timers best practice.

https://www.outsystems.com/learn/courses/43/master-class-on-best-practices-and-timers/


Regards,

-PJ-