RowSet to Excel - faster method than iterating row by row?

I am copying data from a RowSet to an Excel spreadsheet using ExcelApplication class.
I am doing this by iterating the RowSet row by row and assigning the string value to Excel cells by looping through rows and columns. This is following the examples in the documentation:

ExcelApplication — Xojo documentation

Is there a quicker way of doing this, as large datasets take some time?
For example, in Excel VBA Range object, there is a method CopyFromRecordSet that allows writing to Excel very quickly without having to iterate.

Is there a similar method in Xojo to copy the entire RowSet contents into Excel?

Using the clipboard is much faster with Xojo and Excel (see Make Excel Faster).

There is also an optimized example in my Xojo Excel Book.

1 Like