Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

codepage problem when import csv into excel2007

Status
Not open for further replies.

Nifrabar

Programmer
Mar 16, 2003
1,343
NL
Hi!
When importing a csv-file into excel the result is that characters like ë, é etc or displayed incorrect.
I think this has to do with codepages.
The strange thing is that this happens not on every PC.
So possibly a setting within Excel? If so, where to do such a setting?
TIA
-Bart
 
If the csv itself is properly coded, say e.g. utf-8 encoded, you can solve this problem by not opening the csv directly but via Excel menu "Data->External data". There you can set things like delimiter - and encoding.

HTH,
MakeItSo

[navy]"We had to turn off that service to comply with the CDA Bill."[/navy]
- The Bastard Operator From Hell
 


ditto to MakeItSo

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Hi!,

Thanks for help.
This is a good workaround.
But why should another PC open such a file correct by just double clicking the file's name?

-Bart
 
Different locale perhaps?


[navy]"We had to turn off that service to comply with the CDA Bill."[/navy]
- The Bastard Operator From Hell
 
MakeItSo,
What do you mean with "different locale"?
-Bart
 
Oops!
Sorry! I kind of missed that you responded! [blush]

With different locale I mean different language settings.
e.g. when the other PC is running a French Windows, then such characters would be displayed correctly by default.

[navy]"We had to turn off that service to comply with the CDA Bill."[/navy]
- The Bastard Operator From Hell
 
Well,
that's not the case. All are having Win XP in Dutch language.
Would there be somewhere a setting within windows or excel which might cause this unwanted effect?
-Bart
 


I NEVER, EVER open .csv files directly in Excel! NEVER, EVER!!!

I ALWAYS, WITHOUT FAIL, IMPORT .csv and other text files into Excel! ALWAYS, WITHOU FAIL!!!

It's like saying, I'll take the CHANCE, I'll WING IT, I'll WAGER that everyting that I want to be CONVERTED or NOT CONVERTED will be done EXACTLY as I SPECIFY.

So if you want to allow the unexpected from time to time, give it yer best shot and break a leg!

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Skip,
Thanks for explaining your solution.
Nevertheless it's strange that using same versions and languages of windows OS and Office on several machines result in different presentations though?
-Bart
 



Your choice:

CHANCE or CERTAINTY!

I think it a no-brainer! I certainly am loosing not a nano-second of sleep over it!

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Well Skip,
Your point is clear.
But my Q remains.
I can hard accept what is happening now caused by ?????
-Bart
 
OK, weekend over.

Hi Bart,

for the process stick to importing. After import you can also save the XLS with the option to update the imported data on next opening, which in this case might be quite a useful feature.

For your curiosity - there are several possibilities.
By default, Excel "guesses" the cell format based on the first eight(?) rows. The number of rows used to guess the cell format is determined by a registry setting.
I would assume there also exists some registry setting for Excel "guessing" the ANSI encoding of a csv. If the first special character is in row 9 and some machines have a registry setting making Excel guess the encoding based on the first 16 rows, then the special character will display fine on that machine but corrupted on others.

Nevertheless: MS Office has so many "funny" settings and effects based on wild hairs that you shouldn't waste a split second investigating this issue to its full extent. It ain't worth it and it won't help you in your process either.
:)

Cheerio,
MakeItSo

[navy]"We had to turn off that service to comply with the CDA Bill."[/navy]
- The Bastard Operator From Hell
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top