Office 2003 SP3 - Problem opening Text Files in Excel

  • Thread starter Rafael Cortes (BiR0)
  • Start date
R

Rafael Cortes (BiR0)

Guys,

I suspect we have a problem comming from the SP3 of Office 2003.
The text import wizzard has some kind of internal logic to dynamically
select the File origin (code page).

For example: for the 2 txt files below it will chose 2 different code pages:

For VED.TXT wizard will choose 1251 Cyrillic (Windows)
For VED2.TXT wizard will choose 1254 Turkish (Windows)

It is not a problem if user opens the txt file manually - s/he than has the
opportunity to specify the code page correctly in case the wizzard has chosen
the wrong one.

The problem comes when other programs (like our on-line banking and payroll)
export data in Excel. The mechanism is that the file in fact is exported as
text, but then opened in Excel automatically without going through the
wizard. In this case the File origin (code page) cannot be specified and we
rely on Excell to 'guess' it correctly, but unfortunately in most cases it
selects a wrong code page and the text in Cyrillic becomes unreadable.

Question: Is there a setting or a registry/GPO entry that can disable this
'smart' function and fix the File origin (code page) to always be 1251
Cyrillic (Windows)?


Regards,
 
R

Rafael Cortes (BiR0)

I have the solution already.

You can change the default choice by running regedit from the Program>Run
menu item. Once in the Registry Editor, navigate to
HKEY_CURRENT_USER>Software>Microsoft>Office>11.0>Excel>Options
Once here, you'll see a few registry entries for Excel 2003.
Right click in the right-hand window and choose New>DWORD
Call the new DWORD item DefaultCPG and hit enter.
Then right click on DefaultCPG and choose Modify.
Set the Base to Decimal, and enter the decimal value for Code Page
(http://msdn2.microsoft.com/en-us/library/aa288104.aspx), then hit OK.

MORE INFORMATION: http://support.microsoft.com/kb/834948

Set default file origin to "Windows(ANSI)":
reg add HKCU\Software\Microsoft\Office\11.0\Excel\Options /v DefaultCPG /t
REG_DWORD /d 0 /f

I suggest to set it to more universal "Windows(ANSI)" codepage as it works
correctly with cyrillic texts as well.
 
D

Dave Peterson

Thanks for posting back.

I'm sure the next victim who searches google will appreciate your consideration.
 
R

Rafael Cortes (BiR0)

Always welcome.

:)

=============================
Rafael Cortes
PricewaterhouseCoopers
GTS - Global Technical Services
 
P

Paul Gorodyansky

Yes, Excel is not suitable to open .TXT if the text inside belongs to
the character set encoding which differs from System Code Page of your
OS.

MS Word, on the other hand, has special module for that - it offers
you to choose encoding and moreover, marks red if the selection is
wrong (it's handy, for example, they send me Japanese and state that
it's Shift_JIS while with Word I can tell that it's not - say UTF-8 or
EUC):

http://ourworld.compuserve.com/homepages/PaulGor/cp_e.htm#open
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top