Found typo in the How to Export TableView to Microsoft Excel.
cell.InitializeNumber(i, j, Row(j))
cell.InitializeText(i, j, Row(j))
InitializeNumber (Col AsInt, Row AsInt, Value AsDouble)
InitializeText (Col AsInt, Row AsInt, Value AsString)
The variables i and j need to be swapped in your code.