Hi I am using VB.Net 2005. I have MS-Office 2000 installed in my PC. After exporting to CSV from the application, I am unable to see special characters like ú, çã í, etc. I have used the following Code :
Public Sub CreateCSVfile(ByVal dtable As DataTable, ByVal strFilePath As String)
Dim sw As New StreamWriter(strFilePath, False)
Dim icolcount As Integer = dtable.Columns.Count
For i As Integer = 0 To icolcount - 1
sw.Write(dtable.Columns(i))
If i < icolcount - 1 Then
sw.Write(",")
End If
Next
sw.Write(sw.NewLine)
For Each drow As DataRow In dtable.Rows
For i As Integer = 0 To icolcount - 1
If Not Convert.IsDBNull(drow(i)) Then
sw.Write(drow(i).ToString())
End If
If i < icolcount - 1 Then
sw.Write(",")
End If
Next
sw.Write(sw.NewLine)
Next
sw.Close()
End Sub
Is there any way to get special characters in CSV file?