How can we create an Excel file using bulk collect or a straightforward for loop instead of a ref cursor?
I need to handle large data files by utilizing values directly from the loop. The current procedure doesn't allow to retrieve the counter value effectively with a ref cursor.