I was wondering if anyone had come across the following problem and had any ideas on how to resolve it: I\'m exporting data from a C# application (.NET 3.5) to Excel (2003)
I use this macro. It inserts an apostrophe before each value that is numeric in each cell.
Sub Macro1()
Dim rwIndex As Integer
Dim colIndex As Integer
For rwIndex = 1 To ActiveSheet.UsedRange.Rows.Count
For colIndex = 1 To ActiveSheet.UsedRange.Columns.Count
If IsNumeric(Cells(rwIndex, colIndex).Value) Then _
Cells(rwIndex, colIndex).Value = "'" _
& Cells(rwIndex, colIndex).Value
Next colIndex
Next rwIndex
End Sub