Exporting the Data of a DBGrid to ExcelSheet?


I need to write a generic function that will receive a DBGrid componente
as parameter and I will export the data of this Grid to a Excel Sheet. I
Know how to export some data to Excel Sheet, but I don't Know how to
get(read) the data of the Grid component, someone Can Help me ?

        Ricardo J. N. Frazao