Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to open UTF-8 files with Workbooks.OpenText

Hello,

We've written an Excel macro that opens a text files as a workbook. We use
the Workbooks.OpenText method to accomplish this. It has been working fine,
but we just recently noticed that if we open try to open a text file as a
workbook that is in UTF-8 character set and includes some Extended Latin
characters (which are two bytes in UTF-8) it splits these two-byte Extended
Latin characters into two seperate characters as the macro creates the Excel
workbook. We noticed that this problem is because Excel by default is
treating the text file as an ANSI file although it is UTF-8, because a
two-byte character in UTF-8 gets converted to two one-byte characters in
ANSI. I tried to find out if the Workbooks.OpenText method has a parameter
which forces Excel to open the text file as UTF-8 rather than defaulting to
ANSI but couldn't find it. How can we force Excel to open a text file as a
UTF-8 text file when opening text files as workbooks using Workbooks.OpenText?

Thank you very much in advance,
Mete
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
GetOpen filename to open files(Workbooks) Frank Situmorang[_3_] Excel Discussion (Misc queries) 11 May 5th 09 01:02 PM
Excel 2003 Workbooks.Open with CorruptLoad=xlRepairFile fails on Excel 5.0/95 file due to Chart, with Error 1004 Method 'Open' of object 'Workbooks' failed Frank Jones Excel Programming 2 June 15th 04 03:21 AM
After OpenText all pastes from external apps use format from OpenText Jim[_31_] Excel Programming 1 November 8th 03 02:17 AM
Workbooks.OpenText Alistair Eberst Excel Programming 2 October 21st 03 12:50 PM
Using Workbooks.OpenText to read a tab-delimited file into a worksheet Dan E[_2_] Excel Programming 0 August 19th 03 08:02 PM


All times are GMT +1. The time now is 12:44 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"