Re: Output to txt:

From: TDM (tdm3_at_verizon.net)
Date: 04/03/04


Date: Sat, 03 Apr 2004 14:14:49 GMT


Roland,

I will give it a try, here goes.

My current need arises from a script I wrote to parse the event logs.

The output starts with the column titles. They can range in string length
based on what event ID I query on. Then to follow, are all the entries
for the queried event ID. I just think it would be nice for all the entries
to line up with the column titles. Some if the entries also have very long
string entries, so in many situations, the column title is not as long as
the
column entry. To get around this for now, I format the output as html
and set up all the entries in tables with a border so it looks somewhat
decent and it all lines up. But, the ideal solution for me would be a text
file formatted with all the entries left aligned with the column title. The
harry part(at least for me) is when the "entry" string length is large, then
you would need to wrap the lines a number of times as needed to get it
to fit nicely in the "column". At the very least, it would be nice to simply
have the entry left align with the column title. I will try to illustrate.

ColTitle1 ColTitle2
ColTitle3

Coll entry 123456790 Col entry yada yada yada yada Col entry
xxxxxxxxyyyy

Not sure how this will come across in your news reader. But the Col
entries can be very long in length at times. I tried stuffing all this in to
arrays as the titles come before the entries, so to line them up properly,
you need to know the max string length for each column in order to
line up entries correctly. But, I ran short of time and chose the HTML
solution instead. To make things even a bit more messy, the number
of columns is not fixed, it can vary based on the event ID you query.

Another ray of hope(no pun intended Ray at work) is the logParser supports
various different output formats that I have not messed with yet. I am
currently
using the "native" output format. If I find the time, I will play with this
some but
for now, I am almost there. I just need some help with formatting the
output.

Some general things to try would be nice, and I sure hope all this
makes sense.

TIA

TDM

"Roland Hall" <nobody@nowhere> wrote in message
news:#5c7fEWGEHA.2612@TK2MSFTNGP09.phx.gbl...
> "TDM" wrote in message news:qsebc.5077$KK3.4347@nwrddc02.gnilink.net...
> :
> : Roland,
> :
> : Sometimes vbTab just aint enough. I too am looking for a decent
formatting
> : solution. In Vb, you had the "Tab()" function where you could specify
the
> : exact column on the line, do you know of any way to accomplish this in
> : vbScript ?
>
> Can you provide more detail on how you want to use the file? What happens
> to it after it is created?
>
> --
> Roland Hall
> /* This information is distributed in the hope that it will be useful, but
> without any warranty; without even the implied warranty of merchantability
> or fitness for a particular purpose. */
> Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
> WSH 5.6 Documentation -
http://msdn.microsoft.com/downloads/list/webdev.asp
> MSDN Library - http://msdn.microsoft.com/library/default.asp
>
>



Relevant Pages

  • Re: Output to txt:
    ... Then to follow, are all the entries ... : column entry. ... To get around this for now, I format the output as html ... Word stores a file with embedded code to display it as it is seen on screen ...
    (microsoft.public.scripting.vbscript)
  • Re: QDE (Quick Date Entry)
    ... The user DOES NOT have to enter dates in yyyy-mm-dd format. ... alternative 2- or 3-digit short date entry treatment. ... QDE is the logical opposite of a one-size-fits-all approach. ... I'll admit my macro doesn't handle such entries ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Formatting autocorrect
    ... insert a formatted auto-correct entry I need to accept the change otherwise ... 4567 entries that I have already. ... new format. ... To transfer the formatted autocorrect entries (actually, ...
    (microsoft.public.office.misc)
  • Re: Find/Replace text, NOT format!!!
    ... I would suggest, when you replace the entries, put an apostrophe before ... it would also become part of the entry. ... > I am running into an extremely irritating problem in excel 2003. ... > When this list was imported some time ago, the format of the column ...
    (microsoft.public.excel.misc)
  • Re: Solving the lib mismatch problem
    ... This section is pointed to by an entry in the section table with the ... The number of entries in the table is determined by DT_VERDEFNUM. ... This is an index into the string section referenced in the section ... Offset in the string section reference by the link in the section ...
    (comp.unix.programmer)