Dim xlApp As Object, xlBook As Object, xlSheet As Object
Dim i As Integer, j As Integer
Set xlApp = CreateObject("excel.application")
Set xlBook = xlApp.Workbooks.Open("C:\test.xls")
Set xlSheet = xlBook.Sheets(1)
For i = 0 To MSFlexGrid1.Rows - 1
For j = 0 To MSFlexGrid1.Cols - 1
xlSheet.Cells(i + 1, j + 1).Value = MSFlexGrid1.TextMatrix(i, j)
Next j
Next i
xlBook.Close True
xlApp.Quit