Hi All,
I am facing a problem that when using Excel to write worksheet value to text
file, the process failure if the cell vlaue has simplified chinese characters.
I am using Win 2000 Prof (Traditional Chinese version) and MS Office 2000
(Traditional Chinese version), Anyone can help? Many thanks.
----- Sample Code -----
Public Sub test()
Dim fso As New FileSystemObject
Dim ts As TextStream
Set ts = fso.CreateTextFile("c:\output.txt")
Dim wrkSheet As Worksheet
Dim rngRange As Excel.Range
Set wrkSheet = ThisWorkbook.Sheets.Item(1)
Set rngRange = wrkSheet.UsedRange
Dim strFieldValue As String
strFieldValue = rngRange.Cells(1, 1)
ts.WriteLine (strFieldValue)
End Sub
The cell(1,1) contains value "??"
Bookmarks