locked
PowerShell CSV - Modify CSV in a folder RRS feed

  • Question

  • Hi, 

    I am trying to get an idea how to achieve this. Please shed some light if you have an idea how to do in PowerShell. 

    I have multiple CSV in a folder. 

    The original format of CSV is in the following format: 

    C1                       C2             C3

    123                      547          558

    456,887               787           887

    789                      7894         710

    788,897,741         127           8798

    I would like to convert to original csv to modified csv:


    C1                       C2          C3

    123                      547        558

    456                      787         887

    887                      787         887

    789                      7894       710

    788                      127         8798

    879                      127         8798

    741                      127         8798

    Thanks!

    • Moved by Dave PatrickMVP Saturday, October 17, 2020 2:20 PM looking for forum
    Saturday, October 17, 2020 5:08 AM

Answers

All replies

  • I'd try asking for help over here.

    https://docs.microsoft.com/en-us/answers/topics/windows-server-powershell.html

     

     



    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server] Datacenter Management

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.

    • Proposed as answer by Leon Laude Sunday, October 18, 2020 10:47 AM
    • Marked as answer by Guido Franzke Friday, October 23, 2020 6:14 AM
    Saturday, October 17, 2020 2:20 PM
  • Some of the numeric values contain commas, and the field values are also separated by commas. Is this correct?

    If so, do the numeric values in every field potentially contain commas, or only the first column/field?

    Sunday, October 18, 2020 8:29 PM