Hi,
From what I see in the video, you have hangs even after loading the grid, so this seems grid related, not related to the code to load the xls file.
I don't need to show the grid to the enduser.
If you have another way to read row by row the excel file then point me in the right direction please.
If you don't need the grid, you should use FlexCel 7: TMS FlexCel for VCL & FMX Powerful, extensive & flexible component suite for native Excel report & file generation & manipulation
GridExcelIO uses an old version of FlexCel (FlexCel 3) too, but FlexCel 7 is faster and it can handle xlsx files too. It is also non-visual, which in this case will speed up the processing. You can see an example of how to read a file here:
https://doc.tmssoftware.com/flexcel/vcl/samples/firemonkey-desktop/reading-files/index.html
And you can use "Virtual Mode" to use less memory when the files are huge, and also to limit the import to say the first 1000 rows:
https://doc.tmssoftware.com/flexcel/vcl/samples/delphi/api/virtual-mode/index.html
So if you want to say show the user the first 1000 rows, but then use all the rows to export, you can use virtual mode to cut the rows you load into the grid, but then load the full file when processing it.
You can also use the FlexCelPreview component to show it, I am not sure if the performance will be different from the grid, but you can try it:
https://doc.tmssoftware.com/flexcel/vcl/samples/firemonkey-mobile/flexdocs/index.html
Finally, note that a big xls/x file can have millions of cells, and while FlexCel code is optimized a lot both for speed and memory consumption, it still can take some time. Especially because xls/x files can have formulas, so in order to calculate them we need to keep the full file in memory. Xlsx in this regard is worse than xls, both because it allows larger files and also because they are zipped xlm files, so we need to unzip them and parse the xml. Still, FlexCel should be fast enough in most cases. If you are getting errors of app not responding, normally the solution is to run the FlexCel code in a thread, and keep some progress in the main thread so Android doesn't report the app as hang.