none
Powershell CSV populate columns RRS feed

  • Question

  • Hi ~~ ~ I have a exisiting CSV. I would like to use power shell to add 3 columns

    and those columns values will be vlookup expressions.

    can we do that in powershell ?

    Wednesday, April 16, 2014 3:29 AM

Answers

  • oh~~ i have found the solution my self~~


    for ($i = 1; $i -le $rowcount; $i++) {
     
      #$ws.cells.item($i,15).activate()

      $ws.cells.item($i,15) = '=VLOOKUP(A'+$i+',''C:\[ServerDescription.xlsx]ServerDescription''!$A:$E,5,FALSE)'
       # $GoLiveDate = $ws.Cells.Item($i, 1).Value
       # $GoLiveDate
       # break

    • Marked as answer by sakurai_db Tuesday, April 22, 2014 6:22 AM
    Tuesday, April 22, 2014 6:22 AM

All replies

  • hihi~~anyone has an idea ?~!?
    Thursday, April 17, 2014 1:15 AM
  • oh~~ i have found the solution my self~~


    for ($i = 1; $i -le $rowcount; $i++) {
     
      #$ws.cells.item($i,15).activate()

      $ws.cells.item($i,15) = '=VLOOKUP(A'+$i+',''C:\[ServerDescription.xlsx]ServerDescription''!$A:$E,5,FALSE)'
       # $GoLiveDate = $ws.Cells.Item($i, 1).Value
       # $GoLiveDate
       # break

    • Marked as answer by sakurai_db Tuesday, April 22, 2014 6:22 AM
    Tuesday, April 22, 2014 6:22 AM