View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] YehWei@gmail.com is offline
external usenet poster
 
Posts: 15
Default Macro to open *.dat files and save as .txt (comma delimited text files)

Hi,

Would appreciate if someone would enlighten me on how I can accomplish
the following:

1. Open each of the dat files in a directory in excel. These dat files
are semicolon delimited files.

2. Apply a set of actions to the opened files (which I've already
saved), then save the files as the original name except for a different
extension. i.e. .txt (comma delimited files).

3. How do I convert *001 in a field to display 001 instead of 1? Seems
like Excel will autoconvert the format to number instead of text.

4. How do I remove the trailing spaces after a name without impacting
the spaces within a name? For e.g. "Harry Lee " becomes "Harry Lee".

Thanks in advance for any help rendered.

YW