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

How to convert a text file into a csv file with splits in line.

$
0
0

Good Morning,
I am new to the forum and a beginner who would love to become proficient at using powershell. I am trying to figure out on how to convert a text file into excel sheet by splitting in between the lines. We have script that automatically writes configuration output into a text file line by line and a pressing issue is that I have to manually export it to a excel sheet to make reporting capabilities.
Need sme inputs on how to  acheive this

Example: in excel sheet i want output to be displayed row by row for the variables.
Group name | _group | _nextID |_class |_ownerID | _id | _dependscondition | _previousName |_Objectcategory |_name |_enabled |
OT TSTgroup DEV.5.1.1.2.1 23 Subgroup


Sample content

-----------------------------------------------------

Group name : OT TSTgroup
-----------------------------------------------------

Group properties:

_group: DEV.5.1.1.2.1

_nextID: 23

_class: SubGroup

_ownerID: Test.1.1

_id: DEV.5.1.1.2.1

_dependsCondition: good

_previousName: OT SUP)

objcategory: xxxyy
_name: OT TST tors

_enabled: true
-----------------------------------------------------

Group name : group testing
-----------------------------------------------------

tor properties:

_error: 120

_name: timalerror
_internalId: 200515786


Viewing all articles
Browse latest Browse all 8411

Trending Articles