View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
external usenet poster
 
Posts: 9,101
Default replace character in txt file before import to excel

You can only remove the unwanted semicolons if you know which ones are the
good ones and which are the bad ones. You have to first look at the text
file and identify why the bad ones are in the file. Only then can you filter
out the bad ones.

"Christian" wrote:

Hi all,

Background
I have a vba rutine that imports a csv file to excel.
The source application where the data is taken from sometimes contain a
semicolon sign ";" with a text field. The semicolon will cause an offset
of the data in excel when the user regional settings is using semicolon
as a delimiter.

Question
is it possible to use some vba code that will replace ";" with for
example "|" before the import of the file to excel is done?

Any ideas are warmly welcome
- Chr