Hi,
I am not really sure I fully understand the situation, but some remarks:
1)Virtual mode reads one cell at a time from the file, tells you the value, and drops it. So you can't get the cell values back from the XlsFile object once you loaded it.
In virtual mode you would load the file into say a TList<> and then use that TList to read the values and fill the grid. (You can use a TGrid in virtual mode, so the data won't be there twice, it will only be in the TList, the "virtual mode" demo uses that). Of course, if you load only the first 50 rows, then you won't have the rest and you will have to load the file again.
2)Make sure that you need virtual mode at all. FlexCel 6 is very optimized for loading huge files, we've tested it here with 1 million rows x 100 columns, and while of course it is a little slow, it doesn't use that much memory. It will for sure use less memory than a TClientDataSet.
So it might make sense to first measure times and memory, and see if normal mode isn't enough. You load the full file, then show some values on the grid, say the first 50 rows (by using the grid in virtual mode, you don't have to have those values twice in memory), and then when you need to process all the values, just use the values in the TXlsFile. This might be faster than the alternatives, so it might be worth measuring.
3)Another solution is, as you say, to load the data into a client dataset, or a database, or a TList, and use that to feed the grid. Also as you say, you can do it 2 ways:
3a)Load the first 50 rows, fil the grid, display it to the user. If the user presses Ok, then reload all the rows.
3b)Load all the rows, display only the first 50, and if the user presses Ok, process the already loaded data.
Whether 3a) or 3b) are better in your case depends in how often the user presses "cancel": If most of the time he presses ok, then it might be faster to load everything at once, since laoding it twice will be a little slower. But I thing 3a): loading it twice is the best option if you want to go with virtual mode. Reading the first 50 rows will be instant, so you can just do it twice. The first pass you load 50 rows and show them to the user, if he presses ok, you load all the file again. The extra time because you loaded the first 50 rows twice won't be noticeable, but for big files the time to show the file to the user will be better.
You might even do the first load normal, and if the user presses ok, load the second time from a thread, so the user can keep doing things (probably selecting the next xls file) while you load the data in the background. This will make the app more responsive.
As said, I am not 100% sure I undestood the idea, if I answered the wrong question, just let me know :)