Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Read from text file, change formatting, write to excel

$
0
0

Hello - I have a program that supplies data in the following format: 

 

BEGIN

    Name           dc1

    Address       10.0.0.2

    Model           Dell PowerEdge R420

    Serial            1234xyz

END

 

BEGIN

    Name           mail1

    Address       10.0.0.3

    Model           Dell PowerEdge R720

    Serial            5678xyz

END

 

BEGIN

    Name           sql1

    Address       10.0.0.4

    Model           Dell PowerEdge R720

    Serial            1234abc

END

 

I'm trying to find a way to manipulate this data to get it in the following format:

 

 

I feel that I've been going about this the wrong way, there must be a simpler solution than what I've been attempting. How would you approach this problem? 

 

 


Viewing all articles
Browse latest Browse all 6937

Trending Articles