LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Use XL 2 Edit a .txt file?

Happy weekend!

I receive an HTML page from the county, and I save it as
a .prn (csv text) file to preserve columnar allignment.
Recently however, they have changed their HTML editor,
and now I get misinterpreted ampersands in the file.
Consequently, when the & is present, the HTML editor
creates & from it, and kills the columnar allignment
for the row containing the ampersand.

Are you with me so far?

If I open the .prn file with Notepad, I can simply Find:
_&_ and Replace this string with _&_, then all is
right with the world.

The problem is that this is a very small part of a large
macro that interprets the county's file, digests it,
formats it, archives it as an .xls file, and runs some
other MSO formatting macros against it to produce instant
website posting of the data.

(How) Can I perform the Find & Replace solution on
the .prn file using MSO VB code? I tried Word, but that
jacks up the column formatting when Word opens
the 'Story'. I tried Excel, but the HTML file enters
Excel as an entire row of data in a single cell (the
first cell in the column contains the entire concatenated
record), and that won't do at all.

Is there a simple non-formatting text editor in my Office
Suite? Is there a mode or method (like Open As... or
OpenAs()) that I can apply via VB to the text within this
file?

If you want samples, email above.

Thanks in advance, as always,

Matthew

=}
 
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
Edit Excel file pdaws Excel Worksheet Functions 1 May 6th 10 08:48 PM
Importing text file, only option to edit existing file smokey99 Excel Discussion (Misc queries) 8 April 26th 06 09:08 PM
2 users open same file and both can edit/change the file RANDY Excel Discussion (Misc queries) 1 January 24th 06 04:06 PM
File Edit toolbar is missing stellarmellor Excel Discussion (Misc queries) 1 February 17th 05 03:23 AM
Can I edit .iqy file from code? Nathan Gutman Excel Programming 2 December 18th 03 08:29 PM


All times are GMT +1. The time now is 05:12 PM.

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

About Us

"It's about Microsoft Excel"