View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
SF SF is offline
external usenet poster
 
Posts: 8
Default Fail to open unicode txt file in excel

Hi,

I can mannually import a unicode text file into excel by specifying the File
origin to be "65001 : Unicode (UTF-8)" but fail to automate the opening of
the same file with the following code.

Dim xlApp As Excel.Application
Dim xlBook As Excel.Workbook
Dim xlSheet As Excel.Worksheet


Set xlApp = CreateObject("Excel.Application")
xlApp.Visible = True
xlApp.Workbooks.OpenText "C:\PIC\OUTPUT.TXT" = Excel open the
OUTPUT.TXT file but not display the correct Unicode format

Could someone advice

SF