Announcement

Collapse
No announcement yet.

VBScript - String Formatting (output in to columns)

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • VBScript - String Formatting (output in to columns)

    I notice there are doesn't seem to be any proper string formatting in VBScript in order to specify how output strings should come out.

    I am trying to align output into clear columns, regardless of the length of the various column inputs. Hence I need a way of stating that a column should be X characters across including spaces in length regardless ("%-10s" type stuff if any of your know string formatting from any other languages)

    I suspect that I will have to write a function to do this...

    What do you do for string formatting in VBS?

  • #2
    Re: VBScript - String Formatting (output in to columns)

    Are you happy with your other forum post at http://www.visualbasicscript.com/m_54936/tm.htm which has had some replies ?
    Best wishes,
    PaulH.
    MCP:Server 2003; MCITP:Server 2008; MCTS: SBS2008

    Comment


    • #3
      Re: VBScript - String Formatting (output in to columns)

      Yes. I've used a custom function, it's easy to do, I just didn't want to reinvent the wheel. Might try the .net import mentioned there in fact...

      Comment


      • #4
        Re: VBScript - String Formatting (output in to columns)

        I'm glad you are happy with a solution. It's useful for other readers of this forum to know what the answer is.
        Best wishes,
        PaulH.
        MCP:Server 2003; MCITP:Server 2008; MCTS: SBS2008

        Comment

        Working...
        X